Skip to content

Poposal: Hook to run acceptance tests - #6256

Merged
hickeyma merged 5 commits into
helm:dev-v3from
VilledeMontreal:feat-v3/runAcceptanceTests
Sep 3, 2019
Merged

hickeyma merged 5 commits into
helm:dev-v3from
VilledeMontreal:feat-v3/runAcceptanceTests

Conversation

@marckhouzam

Copy link
Copy Markdown
Member

What this PR does / why we need it:

To run acceptance tests during development, it would be easier to run

make test-acceptance

directly from the Helm repo, instead of having to do:

make build
make build-cross
cd ../acceptance-testing
export ROBOT_HELM_PATH=../helm/bin
make acceptance
cd ../helm

Granted that running all the acceptance tests during development may not be a very common case, but it opens the door to easily running a subset of these tests such as the tests for completion, as also included in this PR:

make test-completion

instead of:

make build
make build-cross
cd ../acceptance-testing
export ROBOT_HELM_PATH=../helm/bin
export ROBOT_RUN_TESTS=shells.robot
make acceptance
cd ../helm

Beyond convenience, this would also help guide people to finding and using the acceptance-testing repo without having to learn much about it: it should just work.

Special notes for your reviewer:

I've used the make targets test-acceptance and test-completion to keep in line with the other make targets for tests, which are all prefixed with test-.

To run the acceptance tests, one can now do:
   make test-acceptance

Signed-off-by: Marc Khouzam <[email protected]>
To run the completion tests, one can now do:
   make test-completion

Signed-off-by: Marc Khouzam <[email protected]>
@helm-bot helm-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 20, 2019
@marckhouzam marckhouzam changed the title PROPOSAL: Hook to run acceptance tests Poposal: Hook to run acceptance tests Aug 20, 2019
@marckhouzam

Copy link
Copy Markdown
Member Author

Heads up to @jdolitsky who maintains the acceptance-testing repo, in case he disagrees.

Signed-off-by: Marc Khouzam <[email protected]>
@jdolitsky
jdolitsky self-requested a review August 20, 2019 18:25

@jdolitsky jdolitsky left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lgtm!

Do you think we can rename test-completion to test-acceptance-completion? We can then follow this pattern and add things like test-acceptance-kubernetes-versions

@marckhouzam

Copy link
Copy Markdown
Member Author

Do you think we can rename test-completion to test-acceptance-completion?
We can then follow this pattern and add things like test-acceptance-kubernetes-versions

Done.

While we're talking about naming, technically, this target should be test-acceptance-shells, but that is not what I'm aiming for as what I really want is to be able to run the completion tests. So I preferred calling it test-acceptance-completion. This will need revisiting the day there are tests added to shells.robot that are not related to completion.

@jdolitsky jdolitsky left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this works for now

@marckhouzam

Copy link
Copy Markdown
Member Author

Is this small improvement to the Makefile ok to merge? It's been approved already.

make test-acceptance
make test-acceptance-completion

It would help the verification of PRs such as #6327 and #6340

@hickeyma hickeyma added the v3.x Issues and Pull Requests related to the major version v3 label Sep 3, 2019
@hickeyma hickeyma added this to the 3.0.0 milestone Sep 3, 2019

@hickeyma hickeyma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The targets look good and I can run them. LGTM, thanks @marckhouzam.

FYI @marckhouzam I am getting some fails when running the tests. Might be my env. Here is the output: https://gist.github.com/hickeyma/8beaa068402c474f176e41087d6c2b24

@hickeyma
hickeyma merged commit 6cc1bd2 into helm:dev-v3 Sep 3, 2019
@marckhouzam
marckhouzam deleted the feat-v3/runAcceptanceTests branch September 3, 2019 12:50
@marckhouzam

Copy link
Copy Markdown
Member Author

Thanks @hickeyma!
The failure you reported was a problem with the acceptance-testing repo and has just been fixed in helm/acceptance-testing#29.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Denotes a PR that changes 10-29 lines, ignoring generated files. v3.x Issues and Pull Requests related to the major version v3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants