-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add usecase unit test for s3 #24
Conversation
This comment has been minimized.
This comment has been minimized.
t.Parallel() | ||
|
||
s3BucketCreatorMock := mock.S3BucketCreator(func(ctx context.Context, input *service.S3BucketCreatorInput) (*service.S3BucketCreatorOutput, error) { | ||
if input.Bucket != "bucket-name" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
string bucket-name
has 12 occurrences, make it a constant (goconst)
@@ -0,0 +1,95 @@ | |||
package mock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
ST1000: at least one file in a package should have a package comment (stylecheck)
app/usecase/s3.go
Outdated
@@ -49,7 +49,7 @@ type S3ObjectsListerOutput struct { | |||
Objects model.S3ObjectIdentifiers | |||
} | |||
|
|||
// S3ObjectsLister is the interface that wraps the basic ListObjects method. | |||
// S3ObjectLister is the interface that wraps the basic ListObjects method. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
ST1021: comment on exported type S3ObjectsLister should be of the form "S3ObjectsLister ..." (with optional leading article) (stylecheck)
HOTTEST report
Reported by hottest |
Code Metrics Report
Details | | main (6d8f2fe) | #24 (4c25620) | +/- |
|---------------------|----------------|---------------|-------|
+ | Coverage | 21.7% | 31.2% | +9.6% |
| Files | 27 | 28 | +1 |
| Lines | 932 | 951 | +19 |
+ | Covered | 202 | 297 | +95 |
+ | Test Execution Time | 30s | 18s | -12s | Code coverage of files in pull request scope (20.9% → 39.7%)
Reported by octocov |
No description provided.