assisted-test-infra
assisted-test-infra copied to clipboard
Add cluster as callback to fixture cluster
Current cluster fixture when called create and register the cluster, We can not modify / update params dynamically when creating cluster
In some cases we may want to get cluster object and before it registerd send params/verify as openshit_version , pull keys and more. example for use case: a test try to send to "register" cluster missing params or ask for custom ocp version based on dynamic configuration.
The idea here allow to user decide on cluster fixture if its a registered cluster object or callback_cluster. In case its a callback cluster we call callback_cluster() and the object created and registered. The callback_cluster is object that has reference to param from cluster fixtube and will allow to change configuration .
Example for testcase: class TestProxy(BaseTest):
callback_cluster = True
def test_benny(self):
supported_versions = cluster.api_client.versions.v2_list_supported_openshift_versions()
cluster1 = cluster()
cluster1.prepare_for_installation()
with this support we will be able to gain the cleanup that cluster fixture has.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: bkopilov Once this PR has been reviewed and has the lgtm label, please assign omertuc for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve
in a comment
Approvers can cancel approval by writing /approve cancel
in a comment
Hi @bkopilov. Thanks for your PR.
I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test
on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test
label.
I understand the commands that are listed here.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
@lalon4 , @adriengentil , @danmanor
This patch to address custom ocp tests ... let me know what do you think. I know its a little bit overhead but it will allow us to extend tests
@bkopilov is this still needed?
/cc @adriengentil @eifrach
/uncc @rccrdpccl
/ok-to-test
@bkopilov: all tests passed!
Full PR test history. Your PR dashboard.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
Issues go stale after 90d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
/close.
/close
Not needed
@bkopilov: Closed this PR.
In response to this:
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.