-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Adding new test command #5118
Adding new test command #5118
Conversation
…nd. GoogleContainerTools#5050) 1. Prints the command help 2. Inherits the common flags
Codecov Report
@@ Coverage Diff @@
## master #5118 +/- ##
=======================================
Coverage 72.32% 72.33%
=======================================
Files 382 383 +1
Lines 13589 13607 +18
=======================================
+ Hits 9828 9842 +14
- Misses 3040 3046 +6
+ Partials 721 719 -2
Continue to review full report at Codecov.
|
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.
Please add an integration test for skaffold test
command similar to TestBuildDeploy
Please update the description to be in sync with the code changes.
Please provide description and sample output on what skaffod test
does when
- For a skaffold project with no test config
- for a skaffold project with test config.
Updated the description to reflect the implementation. |
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.
mostly nits and docs comments here. logic of this is looking good!
@@ -73,6 +73,7 @@ End-to-end pipelines: | |||
|
|||
Pipeline building blocks for CI/CD: | |||
build Build the artifacts | |||
test Test the artifacts |
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.
I realize you're just pattern matching against what we already have written here so you don't necessarily need to address in this PR, but I think we should try not to use the term artifact
in our docs if we can avoid it. it's not really a concept that has meaning outside of skaffold, so it's fine to use in code (e.g. for function names) but we shouldn't use it when talking about real concepts in docs.
this could be something like "Run tests against images built by Skaffold" or something similar.
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.
Added a tracking issue - #5148
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.
one thought I had that I wanted to mention here: do we really need to be passing --build-artifacts
to a test
command?
to me it feels like this command in the future might be used to run unit tests against source code, which doesn't need any built images to run, in which case we wouldn't need to pass any flags here. but, since our current implementation of tests is exclusively container-structure-tests (which obviously need built images to run), our options are either run the build before the test, or pass them through the --build-artifacts
flag.
in the future, I think we should consider whether this should be a hard requirement for running tests vs. a configurable option (e.g. needsBuiltImages
boolean in the config), but that's out of scope for this PR.
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.
I think this we can merge this now. follow up work is being tracked in #5066
Fixes: #5050
Description
Added a new test command for testing the applications. This command takes pre-built artifact(s) as input from a file and runs the tests on them.
Skaffold currently does not support testing the applications locally and it is required for developers to submit their changes to the upstream repo/branch.
The test command:
Run
skaffold test
to test the applications.Added unit tests and integrations tests for the newly added test command.
Usage
Help
a. Without the help command
b. With the help command
Sample runs
a. For a skaffold project with no test config
b. For a skaffold project with test config