-
Notifications
You must be signed in to change notification settings - Fork 208
implement e2e tests for FPGA plugin #359
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
Conversation
7d8661c
to
6ebe24d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me given the commented out leftovers are removed.
If you mean these 2 lines:
I left them on purpose. Sometimes it's useful to see the logs of failing container. LogFailedContainers doesn't do it for some reason. |
Yes, these two lines. Could you please add comment there about the purpose? To discourage others from dropping it later. :) |
6ebe24d
to
23e636d
Compare
@rojkov done |
23e636d
to
3cb9bd2
Compare
implemented e2e tests for preprogrammed(af) and orchestrated(region) plugin modes.
ginkgo.By(fmt.Sprintf("deploying webhook in %s mode", webhookMode)) | ||
_, _, err := framework.RunCmd(webhookDeployScriptPath, "--mode", webhookMode, "--namespace", fmw.Namespace.Name) | ||
framework.ExpectNoError(err) | ||
|
||
waitForPod(fmw, "intel-fpga-webhook") | ||
|
||
ginkgo.By(fmt.Sprintf("deploying FPGA plugin in %s mode", pluginMode)) | ||
_, _, err = framework.RunCmd(pluginDeployScriptPath, "--mode", pluginMode, "--namespace", fmw.Namespace.Name) | ||
framework.ExpectNoError(err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've not played with FPGA deployments enough to have strong opinion here but I wonder if we should:
- deploy a "global webhook" that gets shared between the tests (AFAIK that's the goal with fpga: make admission webhook mode-less #358)
- have a custom namespace for the webhook serviceaccount
- deploy plugin using the default serviceaccount
- the key test case is "Note that the mappings are scoped to the namespaces they were created in and they are applicable to pods created in the corresponding namespaces." isn't that possible in each custom test run where the namespace comes from gingko?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently webhook and plugin mode must match. The test uses both modes, that's why I implemented it this way. Another point of doing this is that it's a cleaner approach to use ginkgo test namespace for as many components as possible because ginkgo automatically cleans its namespace after the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bart0sh I don't like the new script and that's why I was pondering options to drop it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, that's probably fine. Do you have input to #318 to ensure "kustomization works correctly"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bart0sh I'll submit a PR to drop travis (I have other housekeeping items in the pipeline too) |
@rojkov can you merge this PR please? |
implemented e2e tests for preprogrammed(af) and
orchestrated(region) plugin modes.
Fixes: #350