-
Notifications
You must be signed in to change notification settings - Fork 49
Conversation
0479ff6
to
78abf0a
Compare
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.
Some Nits, rest LGTM
Also use t.Cleanup() instead of defer to cleanup after tests. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
So regular unit tests for executor can be run. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
Rather than in runtime. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
78abf0a
to
300075b
Compare
return fmt.Errorf("checking Terraform version: %w", err) | ||
} | ||
// requiredVersion is const, so we test it in unit tests. | ||
constraints, _ := version.NewConstraint(requiredVersion) |
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.
we can log it in debug mode? So we don't lose track of it altogether.
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.
Why? It is covered by unit tests, running exactly the same code.
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.
It's best to panic in such case, if this error should be found during development itself.
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
//+build e2e |
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.
Should e2e tests sit in test
dir? Mixing unit tests and e2e tests?
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.
IMO, those are package-scoped tests, so I think it's fine if they sit in this directory. They are marked as e2e
, as they require external dependency to pass (terraform
binary).
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.
Looks great
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.
ok
Part of #1023.