Skip to content
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

test(e2e): add ability to skip building docker image #262

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

adamreese
Copy link
Member

This allows you to run e2e tests without rebuilding the image by setting E2E_SKIP_BUILD environment variable.

@calebschoepp
Copy link
Contributor

What's the intention behind setting E2E_SKIP_BUILD? Is it so that when your repeatedly running e2e tests locally you can save time?

@adamreese
Copy link
Member Author

Yep, when I'm writing e2e tests I comment out that line because it takes a long time to build when there's no need for it

e2e/main_test.go Outdated
if p := utils.RunCommand(`bash -c "cd .. && IMG=ghcr.io/spinkube/spin-operator:dev make docker-build"`); p.Err() != nil {

return ctx, fmt.Errorf(ErrFormat, p.Err(), p.Out())
if os.Getenv("E2E_SKIP_BUILD") == "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

gonna need to update the linter config to allow this in e2e/

Copy link
Member Author

Choose a reason for hiding this comment

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

Missed that check 👍

This allows you to run e2e tests without rebuilding the image by setting
E2E_SKIP_BUILD environment variable.

Signed-off-by: Adam Reese <[email protected]>
@endocrimes endocrimes merged commit fefd2b1 into spinkube:main Jul 8, 2024
11 checks passed
@adamreese adamreese deleted the test/skip-build branch July 16, 2024 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants