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 more to test suite #257

Closed
cgwalters opened this issue Dec 20, 2018 · 6 comments
Closed

add more to test suite #257

cgwalters opened this issue Dec 20, 2018 · 6 comments

Comments

@cgwalters
Copy link
Member

It should be pretty easy to put together a quick test suite in e.g. bash that given a running cluster, tests at least a nondestructive scenario of creating a MC, waiting for it to roll out, running a quick daemonset that verifies the files exist, then e.g. deletes it and verifies the nodes are back as they were.

We may be able to enhance non-destructive testing by creating a separate machineset too and having MCs being more destructive just to those nodes (e.g. making them degraded etc.)

@kikisdeliveryservice
Copy link
Contributor

I'm supposed to work on some e2e testing after my other PRs are done, so count me in! :D

@abhinavdahiya
Copy link
Contributor

@smarterclayton whats the best location to add operator level tests ? That require a cluster.

@smarterclayton
Copy link
Contributor

See the e2e-aws-operator jobs in openshift/release. Basically have a binary / script in your repo, copy their pattern, then you get passed a kubeconfig and can run.

cgwalters added a commit to cgwalters/machine-config-operator that referenced this issue Jan 14, 2019
Ref: openshift#257

Add a basic test file, targeting a test case for
openshift@44d5c52
since it's easy.

Next step is to try hooking this up to Prow.

(I'm a bit undecided about bash as a framework; looks like other
 projects are using Go, but eh...if we decide to do something else
 we can easily exec it, and anyways this is just to get the ball
 rolling)
@cgwalters
Copy link
Member Author

One thing related to #294 is that I think it would be an extremely useful pattern for us to support spinning up a "testnode" machine type that is marked tainted; we could then use it as a target for e.g. upgrade and other testing.

cgwalters added a commit to cgwalters/machine-config-operator that referenced this issue Jan 16, 2019
Add a basic test suite, targeting a test case for
openshift@44d5c52

This is inspired by the cluster-image-registry-operator tests:
https://github.com/openshift/cluster-image-registry-operator/blob/e6c7544903d2826d171be45cdde5a83a58d97383/test/e2e/main_test.go

Next step is to try hooking this up to Prow.

Related: openshift#257
Replaces: openshift#298
cgwalters added a commit to cgwalters/release that referenced this issue Jan 16, 2019
Note I called this `-op` and not `-operator` as otherwise
prowgen warned me about too long of a job name.

See:
openshift/machine-config-operator#298
openshift/machine-config-operator#257
@cgwalters cgwalters changed the title create test suite that assumes existing cluster add more to test suite Jan 16, 2019
@cgwalters
Copy link
Member Author

I'm just going to repurpose this issue now for "let's add more to the test suite" since it's not covering much at all.

I think we can add a test case for e.g. "add a MC that adds a file to workers" easily now.

It'd also be good to extend that and script a reconciliation failure (rsh into the mcd and make a conflicting file?).

Testing SSH key updates should be pretty straightforward I think.

But most interesting (for me) is testing OS updates, to do that nicely a pattern like #257 (comment) would help.

@cgwalters
Copy link
Member Author

This issue is basically done, we can track anything else via PRs.

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

No branches or pull requests

4 participants