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 Google Cloud Storage Source e2e test #124

Merged
merged 4 commits into from
Dec 9, 2021
Merged

Conversation

FranBarrera
Copy link
Contributor

Closes #123

Copy link
Contributor

@cab105 cab105 left a comment

Choose a reason for hiding this comment

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

The test looks primarily good. Do have one question that should be addressed before blessing the PR.

// CreateObject creates an object named after the given framework.Framework.
func CreateObject(storageCli *storage.Client, project string, bucket string, f *framework.Framework) string {
object := f.UniqueName
file, err := os.Create("/tmp/" + object)
Copy link
Contributor

Choose a reason for hiding this comment

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

I see the file being created, but where is it being deleted?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cab105 I just added the file deletion.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to delete though? I haven't looked at the code yet, but I would expect that we simply

  1. Create a bucket
  2. Create a file
  3. Delete the bucket

similarly to other tests (GitHub, etc.)

Copy link
Contributor

Choose a reason for hiding this comment

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

We do in this case as the file is created locally first, and then uploaded to GCP. Since these tests can run locally we need to clean up our mess instead of relying on a higher power to do it for us (whether it is in docker or reboot on some unix based systems).

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, didn't understand it that way :) Thanks for the clarification!

@FranBarrera FranBarrera merged commit 4e9ed28 into main Dec 9, 2021
@FranBarrera FranBarrera deleted the gcloud-storage-e2e branch December 9, 2021 16:57
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.

e2e: Add test for Google Cloud Storage source
3 participants