-
Notifications
You must be signed in to change notification settings - Fork 37
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 crd support #109
base: master
Are you sure you want to change the base?
Add crd support #109
Conversation
Let's move discussion here. Seems the problem you faced in grafana helm issue: grafana/helm-charts#1515 |
Can anybody help with the test requirements? Get below error when trying to add test in test/test_KubeLibrary.py. Looks like the test run engineer does not have permission to read CRD's. Traceback (most recent call last): |
I think the problem is that in unit tests you are actually trying to connect to real cluster which doesn't exist, you are not using mock
which would allow your test to act as cluster is in place |
${crd_name} repos.configmanagement.gke.io | ||
|
||
*** Test Cases *** | ||
Check All The Custom Resource Definitions Exist |
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.
you are missing
[Tags] other
as a result they are not executed in CI
@@ -783,3 +783,11 @@ def test_read_namespaced_cron_job(self, mock_lnp): | |||
cron_job_details2 = kl.get_cron_job_details_in_namespace('hello', 'default') | |||
self.assertEqual(cron_job_details.items.metadata.labels.TestLabel, cron_job_details2.items.metadata.labels.TestLabel) | |||
self.assertEqual('mytestlabel', cron_job_details.items.metadata.labels.TestLabel) | |||
|
|||
def test_read_cluster_custom_definition(self): | |||
pass |
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.
add mocks and perform actual check
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.
Thanks for your reply! Really appreciate it. Will fix it later on.
Add Custom Resource Definition (CRD)
Following the existing Custom Resource Object functions to add support for CRD read and list.
Fixes #108
Before merge following needs to be applied: