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 provider test cases #11

Merged
merged 1 commit into from Mar 27, 2023
Merged

test(e2e): add provider test cases #11

merged 1 commit into from Mar 27, 2023

Conversation

ghost
Copy link

@ghost ghost commented Mar 22, 2023

This PR adds smoke test cases for the devpod provider subcommand

@ghost ghost marked this pull request as ready for review March 24, 2023 14:23
@linear
Copy link

linear bot commented Mar 24, 2023

ENG-1107 DevPod E2E Tests

Create a couple of e2e tests that make sure DevPod works correctly with the Local Provider.

We need:

  • Github Action that runs the e2e tests on PR (similar to how we do it in vcluster, devspace etc.)

  • Github Action that runs the existing unit tests on PR (similar to how we do it in vcluster, devspace etc.)

  • Boilerplate code for e2e tests, I would suggest we use ginkgo as we do in our other projects

  • Couple of e2e tests that test the following:

  • Create/delete/stop/start workspace via devpod up (use provider local)

  • Check ssh is working via devpod ssh --comand

  • Check adding/updating/deleting a provider works via devpod provider add examples/simple-k8s-provider

Approach: ~4-6 hours

  • Copy structure from DevSpace ~1 hour
  • Test DevPod yourself locally, run devpod up & devpod ssh (Done)
  • Invoke the commands in the e2e test: ~1-2 hours
    • User input is out of scope (e2e tests should work with flags and never try to answer any user questions)
    • Before devpod up , you need to run devpod use provider local
  • Test the e2e tests locally ~1-2 hours
  • Test the pipeline remotely ~1-2 hours

@ghost ghost requested a review from FabianKramm March 24, 2023 14:23
Copy link
Member

@FabianKramm FabianKramm left a comment

Choose a reason for hiding this comment

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

@kristoffn thanks for the PR! Please take a look at my comments


// Update provider 2
err = f.DevPodProviderUpdate([]string{"provider2", tempDir + "/provider2-update.yaml"})
framework.ExpectNoError(err)
Copy link
Member

Choose a reason for hiding this comment

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

Can we ensure here that the provider was actually updated?

Copy link
Author

Choose a reason for hiding this comment

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

framework.ExpectNoError(err)

// Cleanup: delete provider 2
err = f.DevPodProviderDelete([]string{"provider2"})
Copy link
Member

Choose a reason for hiding this comment

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

Can we ensure here that the provider was actually deleted?

Copy link
Author

Choose a reason for hiding this comment

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

@ghost ghost requested a review from FabianKramm March 27, 2023 09:48
@FabianKramm FabianKramm merged commit edfff8c into loft-sh:main Mar 27, 2023
@ghost ghost deleted the test/ENG-1107-e2e-provider-testcases branch March 27, 2023 14:54
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.

None yet

1 participant