Skip to content

Don't generate kubeclient at runtime in testing framework #2570

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

Closed
awgreene opened this issue Jan 14, 2022 · 2 comments · Fixed by #2790
Closed

Don't generate kubeclient at runtime in testing framework #2570

awgreene opened this issue Jan 14, 2022 · 2 comments · Fixed by #2790
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. triaged Issue has been considered by a member of the OLM community
Milestone

Comments

@awgreene
Copy link
Member

Feature Request

Is your feature request related to a problem? Please describe.
Functions used to facilitate testing should request a kubeclient as a parameter as opposed to creating a new Kubeclient as part of the function. Born from this disscussion

Describe the solution you'd like
Do not generate kubeclients at runtime in functions used for e2e testing.

@awgreene awgreene added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 14, 2022
@dinhxuanvu dinhxuanvu added the triaged Issue has been considered by a member of the OLM community label Jan 20, 2022
@dinhxuanvu dinhxuanvu added this to the 0.21.0 milestone Jan 20, 2022
@dinhxuanvu dinhxuanvu added the good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. label Jan 20, 2022
@exdx
Copy link
Member

exdx commented Mar 31, 2022

This would require taking a look at the existing e2e tests and wherever a client is being generated as part of the test, replace it with a client that created at test start-up time.

@exdx exdx modified the milestones: 0.21.0, 0.22.0 Mar 31, 2022
@nsapse nsapse self-assigned this May 25, 2022
@nsapse
Copy link
Contributor

nsapse commented May 27, 2022

As I hack away on this I just want to confirm I'm understanding the scope correctly. The original issue is limited to replacing created instances of kubeclient in functions where the second says wherever a client is being generated as part of the test which seems slightly broader. I am currently working on refactoring out all test based instances of creating clients and replacing them with tests created at startup time in the global before each. Before I go any further - is that consistent with what's desired from this ticket?

nsapse added a commit to nsapse/operator-lifecycle-manager that referenced this issue May 27, 2022
- Closes operator-framework#2570
- Moves kubeclient creation to startup time and passes created client to
all future tests.
- Removes creation of clients from each individual test.
nsapse added a commit to nsapse/operator-lifecycle-manager that referenced this issue May 31, 2022
- Closes operator-framework#2570
- Moves kubeclient creation to startup time and passes created client to
all future tests.
- Removes creation of clients from each individual test.
nsapse added a commit to nsapse/operator-lifecycle-manager that referenced this issue May 31, 2022
- Closes operator-framework#2570
- Moves kubeclient creation to startup time and passes created client to
all future tests.
- Removes creation of clients from each individual test.
nsapse added a commit to nsapse/operator-lifecycle-manager that referenced this issue Jun 1, 2022
- Closes operator-framework#2570
- Moves kubeclient creation to startup time and passes created client to
all future tests.
- Removes creation of clients from each individual test.
nsapse added a commit to nsapse/operator-lifecycle-manager that referenced this issue Jun 1, 2022
- Updates tests to use common Kube and Runtime clients generated at
startup time rather than having them re-generated in each test at
runtime.
- Closes operator-framework#2570

Signed-off-by: Noah Sapse <[email protected]>
nsapse added a commit to nsapse/operator-lifecycle-manager that referenced this issue Jun 1, 2022
- Updates tests to use common Kube and Runtime clients generated at
startup time rather than having them re-generated in each test at
runtime.
- Closes operator-framework#2570

Signed-off-by: Noah Sapse <[email protected]>
nsapse added a commit to nsapse/operator-lifecycle-manager that referenced this issue Jun 1, 2022
- Updates tests to use common Kube and Runtime clients generated at
startup time rather than having them re-generated in each test at
runtime.
- Closes operator-framework#2570

Signed-off-by: Noah Sapse <[email protected]>
nsapse added a commit to nsapse/operator-lifecycle-manager that referenced this issue Jun 2, 2022
- Updates tests to use common Kube and Runtime clients generated at
startup time rather than having them re-generated in each test at
runtime.
- Closes operator-framework#2570

Signed-off-by: Noah Sapse <[email protected]>
nsapse added a commit to nsapse/operator-lifecycle-manager that referenced this issue Jun 2, 2022
- Updates tests to use common Kube and Runtime clients generated at
startup time rather than having them re-generated in each test at
runtime.
- Closes operator-framework#2570

Signed-off-by: Noah Sapse <[email protected]>
nsapse added a commit to nsapse/operator-lifecycle-manager that referenced this issue Jun 2, 2022
- Updates tests to use common Kube and Runtime clients generated at
startup time rather than having them re-generated in each test at
runtime.
- Closes operator-framework#2570

Signed-off-by: Noah Sapse <[email protected]>
nsapse added a commit to nsapse/operator-lifecycle-manager that referenced this issue Jun 3, 2022
- Updates tests to use common Kube and Runtime clients generated at
startup time rather than having them re-generated in each test at
runtime.
- Closes operator-framework#2570

Signed-off-by: Noah Sapse <[email protected]>
nsapse added a commit that referenced this issue Jun 6, 2022
- Updates tests to use common Kube and Runtime clients generated at
startup time rather than having them re-generated in each test at
runtime.
- Closes #2570

Signed-off-by: Noah Sapse <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. triaged Issue has been considered by a member of the OLM community
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants