Closed barmull closed 1 week ago
For testing I set KUBECONFIG into existing file, but the file is empty. Resulting that KUBECONFIG is set, but cluster is not running. See in this screenshot:
In this case is not working as expected. Because the change is only in method ensure_kubeconfig! In this PR https://github.com/cnti-testcatalog/testsuite/pull/1964 the method ensure_kubeconfig! is added into task create_namespace. So, if you want to properly tested, you need to have this two PRs together. And then you get the same output as mine above.
In this case is not working as expected. Because the change is only in method ensure_kubeconfig! In this PR #1964 the method ensure_kubeconfig! is added into task create_namespace. So, if you want to properly tested, you need to have this two PRs together. And then you get the same output as mine above.
I checked out your fork and both changes were included when tested.
In your output is missing message 'KUBECONFIG is already set.' It seems that method ensure_kubeconfig is not executing. The method should be inserted in "create_namespace" task. So even if you set KUBECONFIG to existing config file, it should catch unhealthy cluster and raise an error. So instead of 'Could not create cnf-testsuite namespace on the Kubernetes cluster' you should see 'Exit code: 256. Executing this command 'kubectl get nodes --kubeconfig=/path/to/config/file' raised an error. For further information run command in CLI.'
Description
Add condition in ensure_kubeconfig! method to check the cluster's health.
Issues:
Refs: #1968
How has this been tested:
Types of changes:
Checklist:
Documentation
Code Review
Issue