-
Notifications
You must be signed in to change notification settings - Fork 157
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 resource factory #389
Add resource factory #389
Conversation
Codecov Report
@@ Coverage Diff @@
## main #389 +/- ##
==========================================
+ Coverage 70.23% 70.25% +0.01%
==========================================
Files 281 282 +1
Lines 6149 6277 +128
==========================================
+ Hits 4319 4410 +91
- Misses 1476 1503 +27
- Partials 354 364 +10
|
17fe6cc
to
4dcd669
Compare
4dcd669
to
2b71c8e
Compare
@@ -118,12 +123,21 @@ func TestAwsInstanceBlockDeviceResourceMapper_Execute(t *testing.T) { | |||
}, | |||
}, | |||
}, | |||
func(factory *terraform.MockResourceFactory) { | |||
factory.On("CreateResource", mock.Anything, "aws_ebs_volume").Times(2).Return(nil, nil) |
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.
Just FYI, you can use here Twice()
instead of Times(2)
but no need to change it.
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.
Yeah I know but I prefer to always use Times
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.
If i == 1 you use Once
and if i > 1 Times(i)
?
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.
Yeah and I was wondering myself if I should use Times
everywhere
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.
Indeed, it is more explicit.
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.
Nice one ! I will push really soon a PR that start testing those middlewares.
Description