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

Add e2e test for GCS #85

Merged
merged 2 commits into from
Oct 15, 2024
Merged

Add e2e test for GCS #85

merged 2 commits into from
Oct 15, 2024

Conversation

khrm
Copy link
Member

@khrm khrm commented Oct 10, 2024

This adds an e2e test for GCS using storage emulator by passing env STORAGE_EMULATOR_HOST. Reference:
https://cloud.google.com/go/docs/reference/cloud.google.com/go/storage/latest

Copy link
Member Author

@khrm khrm left a comment

Choose a reason for hiding this comment

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

We need to merge #84 first.

@khrm khrm force-pushed the e2eGCS branch 2 times, most recently from 7b80f74 to 712a53f Compare October 10, 2024 06:49
@khrm khrm changed the title WIP: Add e2e test for GCS Add e2e test for GCS Oct 10, 2024
@khrm
Copy link
Member Author

khrm commented Oct 10, 2024

@vdemeester Should I write this in Go or is bash fine?
It will be just calling a PR in GO and checking as we do in the Tekton repo but it will needlessly pull pipeline repo.

tests/e2e.sh Outdated Show resolved Hide resolved
@khrm khrm force-pushed the e2eGCS branch 9 times, most recently from e5c2cc6 to 2424f49 Compare October 10, 2024 16:28
value: $(workspaces.cred.path)/config
- name: googleCredentialsPath
value: $(workspaces.cred.path)/creds.json
- name: validate-cache
Copy link
Member Author

Choose a reason for hiding this comment

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

@PuneetPunamiya See this. In this step, we validate cache. In the previous step, we fetched catch in a different workspace - test.

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

I know it's probably easier to write it in bash, but why don't we have all our tests in go instead (under the e2e build tag) ?

@khrm
Copy link
Member Author

khrm commented Oct 11, 2024

@vdemeester Is it fine if I pull pipelines repo to write tests?

@vdemeester
Copy link
Member

@khrm it depends in what you pull it for 🤭 if it is for 2 functions we can duplicate them here 🤭

@khrm
Copy link
Member Author

khrm commented Oct 11, 2024

@vdemeester Basically, we would need the pipelinerun client to check status. In script, I am using kubectl in bash.

@khrm khrm force-pushed the e2eGCS branch 2 times, most recently from 320f2c1 to a3d515b Compare October 11, 2024 16:51
khrm added 2 commits October 11, 2024 22:54
This adds an e2e test for GCS using storage emulator by passing env
STORAGE_EMULATOR_HOST. Reference:
https://cloud.google.com/go/docs/reference/cloud.google.com/go/storage/latest
@vdemeester
Copy link
Member

@vdemeester Basically, we would need the pipelinerun client to check status. In script, I am using kubectl in bash.

ah yes, it is fine 👍🏼

@vdemeester
Copy link
Member

/test tekton-caches-main-cache-on-pull-request

@@ -6,8 +6,10 @@ TIMEOUT_UNIT = 20m
GOFUMPT=gofumpt

e2e-coverage: ## run e2e tests with coverage
@go test -failfast -count=1 -tags=$(E2E_TAG) ./tests -coverpkg=./... -coverprofile /tmp/coverage.out
tests/e2e.sh
Copy link
Member

Choose a reason for hiding this comment

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

Might want to rename this "e2e-prepare.sh" or something but it could be done in a follow-up.

@vdemeester vdemeester merged commit 93789e6 into openshift-pipelines:main Oct 15, 2024
7 checks passed
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