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

adds basic setup for e2e testing #115

Merged
merged 2 commits into from
Mar 8, 2024
Merged

adds basic setup for e2e testing #115

merged 2 commits into from
Mar 8, 2024

Conversation

michelleN
Copy link
Contributor

  • adds a simple e2e test for the containerd executor

Copy link

This PR now has an image available for testing:

  ttl.sh/spoopy-operator-pr-115:24h

@michelleN michelleN linked an issue Feb 29, 2024 that may be closed by this pull request
Copy link
Contributor

@calebschoepp calebschoepp left a comment

Choose a reason for hiding this comment

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

Thanks Michelle, this is some great work. The actual code itself LGTM but I have a number of overarching questions:

  • How do these e2e tests compare to the tests we have like spinapp_controller_test.go. It's clear to me the setup is at a different level of abstraction, but what will this allow us to test that the other can't?
  • How do these e2e tests compare to the smoke tests we have? Does this obviate the need for some of our smoke tests?
  • Would it be possible to add these tests into the CI in this PR? It'd be nice to be able to see they're passing.

Comment on lines 23 to 25
// TestDefaultSetup is a test that checks that the minimal setup works
//
// with the containerd wasm shim runtime as the default runtime.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Formatting for this comment

}

func (c *Cluster) Destroy() error {

Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Extra newline

Copy link
Contributor

@endocrimes endocrimes left a comment

Choose a reason for hiding this comment

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

I'm gonna give this a proper review tomorrow but generally LGTM - I don't love the bdd-i-ness, but it's at least go-test-y bdd.

@calebschoepp this is gonna be great for testing things like #122 - where we want to be able to validate that the provided runtime config is something that the shim can understand - because that relies on having a real cluster, rather than just an API serverr.

jobs:
e2e:
runs-on: ubuntu-latest
steps:
Copy link
Contributor

Choose a reason for hiding this comment

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

needs the standard boilerplate of checkout steps / installing Go

+ adds a simple e2e test for the containerd executor

Signed-off-by: Michelle Dhanani <[email protected]>
@michelleN
Copy link
Contributor Author

How do these e2e tests compare to the tests we have like spinapp_controller_test.go. It's clear to me the setup is at a different level of abstraction, but what will this allow us to test that the other can't?
Adding to what @endocrimes said, it'll allow us to do things like test more complex installation/configuration scenarios on different Kubernetes providers, ensure the correct Kubernetes bits were created/deployed/are running/get cleaned up when appropriate. Could also be used to test performance later.

How do these e2e tests compare to the smoke tests we have? Does this obviate the need for some of our smoke tests?
Yes

Would it be possible to add these tests into the CI in this PR? It'd be nice to be able to see they're passing.
Yes, adding that now.

+ adds e2e make target for running e2es
+ updates return err to include output for
better debugging experience
+ add workflow for checking e2e on PRs to main

Signed-off-by: Michelle Dhanani <[email protected]>
@michelleN michelleN merged commit 98ddfca into main Mar 8, 2024
11 checks passed
@michelleN michelleN deleted the e2e branch March 8, 2024 15:59
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 testing
3 participants