-
Notifications
You must be signed in to change notification settings - Fork 507
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
Initial changes for e2e testing framework #553
Initial changes for e2e testing framework #553
Conversation
One test case I can think of :
|
cce5a7b
to
0e93a3d
Compare
Codecov Report
@@ Coverage Diff @@
## master #553 +/- ##
==========================================
+ Coverage 76.98% 77.32% +0.33%
==========================================
Files 98 97 -1
Lines 2368 2381 +13
==========================================
+ Hits 1823 1841 +18
+ Misses 402 398 -4
+ Partials 143 142 -1
|
2cef957
to
2434d9e
Compare
}) | ||
It("should error out and exit with status code 1", func() { | ||
session = runInitCommand(terrascanBinaryPath, outWriter, errWriter, 1) | ||
helper.ContainsErrorSubString(session, "invalid/path: no such file or directory") |
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 should make changes to return a more specific error message for erranous rego subdir.
Not to be fixed in this PR though.
test/e2e/init/init_test.go
Outdated
}) | ||
}) | ||
|
||
func runInitCommand(terrascanBinaryPath string, outWriter, errWriter io.Writer, exitCode int) *gexec.Session { |
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.
these three functions can be moved to helper or test_util file
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 a minor change to move the functions. everything else LGTM.
2434d9e
to
7d2551a
Compare
7d2551a
to
f906aed
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
review comments accommodated
Added tests for init command.