Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TM-785] Unit testing and linting for the BE repo #135

Merged
merged 22 commits into from
Apr 10, 2024

Conversation

roguenet
Copy link
Collaborator

@roguenet roguenet commented Apr 9, 2024

https://gfw.atlassian.net/browse/TM-785

  • I removed all the legacy tests. They were slow, and most of them were testing dead code. They also did problematic things like potentially mess with the contents of our S3 buckets
  • All other tests are fixed up so they run locally and on github actions.
    • To test locally, run make test
  • Linter and tests passing are now a requirement to merge into staging, main or release/**

@roguenet roguenet force-pushed the feat/TM-785-unit-tests branch 3 times, most recently from 9d85f0f to 353c15b Compare April 9, 2024 22:28
@roguenet roguenet force-pushed the feat/TM-785-unit-tests branch from 353c15b to 5818748 Compare April 9, 2024 22:33
@roguenet roguenet requested review from pachonjcl and cesarLima1 April 9, 2024 22:43
{
if (! config('app.sns.enabled')) {
return null;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should likely remove the SNS integration entirely as it's only useful for mobile apps, but for now this will do.

@@ -392,7 +390,7 @@
Route::get('/projects', ViewMyProjectsController::class);
});

Route::post('/users/resend', [AuthController::class, 'resendByEmail']);
Route::post('/users/resend', [AuthController::class, 'resendByEmail'])->withoutMiddleware('auth:service-api-key,api');
Copy link
Collaborator Author

@roguenet roguenet Apr 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the first bug found by the resurrected test suite. This endpoint currently doesn't work in production, but as far as I know nobody has reported it yet.

Copy link
Collaborator

@pachonjcl pachonjcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lot of changes, glad that we have test back.

@roguenet roguenet merged commit fc77911 into staging Apr 10, 2024
1 check passed
@roguenet roguenet deleted the feat/TM-785-unit-tests branch April 10, 2024 15:43
egrojMonroy pushed a commit that referenced this pull request Nov 1, 2024
[TM-785] Unit testing and linting for the BE repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants