diff --git a/ozgcloud-keycloak-operator/src/test/helm/crds/operator.ozgcloud.de_OzgKeycloakClient_test.yaml b/ozgcloud-keycloak-operator/src/test/helm/crds/operator.ozgcloud.de_OzgKeycloakClient_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a1ac4ab3af2892293830a3657db9fc5711ab5bc6 --- /dev/null +++ b/ozgcloud-keycloak-operator/src/test/helm/crds/operator.ozgcloud.de_OzgKeycloakClient_test.yaml @@ -0,0 +1,51 @@ +suite: operator.ozgcloud.de_OzgCloudKeycloakClient test +templates: + - templates/crds/operator.ozgcloud.de_OzgKeycloakClient.yaml +tests: + - it: should have apiVersion + asserts: + - equal: + path: apiVersion + value: apiextensions.k8s.io/v1 + - it: should have isKind of + asserts: + - isKind: + of: CustomResourceDefinition + + - it: should have metadata name + asserts: + - equal: + path: metadata.name + value: ozgcloudkeycloakclients.operator.ozgcloud.de + + - it: should have spec group + asserts: + - equal: + path: spec.group + value: operator.ozgcloud.de + - it: should have spec names kind + asserts: + - equal: + path: spec.names.kind + value: OzgCloudKeycloakClient + - it: should have spec names listKind + asserts: + - equal: + path: spec.names.listKind + value: OzgCloudKeycloakClientList + - it: should have spec names plural + asserts: + - equal: + path: spec.names.plural + value: ozgcloudkeycloakclients + - it: should have spec names singular + asserts: + - equal: + path: spec.names.singular + value: ozgcloudkeycloakclient + + - it: should have spec scope + asserts: + - equal: + path: spec.scope + value: Namespaced \ No newline at end of file diff --git a/ozgcloud-keycloak-operator/src/test/helm/crds/operator.ozgcloud.de_OzgKeycloakClient_v1_test.yaml b/ozgcloud-keycloak-operator/src/test/helm/crds/operator.ozgcloud.de_OzgKeycloakClient_v1_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3c36261a0532338ae6a05ef23c8111cf79bb2d60 --- /dev/null +++ b/ozgcloud-keycloak-operator/src/test/helm/crds/operator.ozgcloud.de_OzgKeycloakClient_v1_test.yaml @@ -0,0 +1,97 @@ +suite: operator.ozgcloud.de_OzgCloudKeycloakClient versions v1 test +templates: + - templates/crds/operator.ozgcloud.de_OzgKeycloakClient.yaml +tests: + - it: should have versions name + asserts: + - equal: + path: spec.versions[0].name + value: v1 + - it: should have versions schema description + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.description + value: OzgCloudKeycloakClient is the Schema for the keycloaks API + - it: should have versions schema type + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.type + value: object + + - it: should have versions schema apiVersion property type + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.apiVersion.type + value: string + - it: should have versions schema apiVersion property description + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.apiVersion.description + value: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + + - it: should have versions schema kind property type + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.kind.type + value: string + - it: should have versions schema kind property description + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.kind.description + value: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + + - it: should have versions schema metadata + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.metadata.type + value: object + + - it: should have versions schema spec description + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.spec.description + value: Spec defines the desired state of Keycloak + - it: should have versions schema spec type + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.spec.type + value: object + - it: should have versions schema spec preserve unknown fields + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.spec.x-kubernetes-preserve-unknown-fields + value: true + + - it: should have versions schema status description + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.status.description + value: Status defines the observed state of Keycloak + - it: should have versions schema status type + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.status.type + value: object + - it: should have versions schema status preserve unknown fields + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.status.x-kubernetes-preserve-unknown-fields + value: true + + - it: should have versions served + asserts: + - equal: + path: spec.versions[0].served + value: true + - it: should have versions storage + asserts: + - equal: + path: spec.versions[0].storage + value: true + - it: should have versions subresources statis + asserts: + - equal: + path: spec.versions[0].subresources.status + value: {} \ No newline at end of file diff --git a/ozgcloud-keycloak-operator/src/test/helm/crds/operator.ozgcloud.de_OzgKeycloakGroup_test.yaml b/ozgcloud-keycloak-operator/src/test/helm/crds/operator.ozgcloud.de_OzgKeycloakGroup_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b5265fe0193272378e9fcbba3db10eb7bfabc620 --- /dev/null +++ b/ozgcloud-keycloak-operator/src/test/helm/crds/operator.ozgcloud.de_OzgKeycloakGroup_test.yaml @@ -0,0 +1,51 @@ +suite: operator.ozgcloud.de_OzgCloudKeycloakGroup test +templates: + - templates/crds/operator.ozgcloud.de_OzgKeycloakGroup.yaml +tests: + - it: should have apiVersion + asserts: + - equal: + path: apiVersion + value: apiextensions.k8s.io/v1 + - it: should have isKind of + asserts: + - isKind: + of: CustomResourceDefinition + + - it: should have metadata name + asserts: + - equal: + path: metadata.name + value: ozgcloudkeycloakgroups.operator.ozgcloud.de + + - it: should have spec group + asserts: + - equal: + path: spec.group + value: operator.ozgcloud.de + - it: should have spec names kind + asserts: + - equal: + path: spec.names.kind + value: OzgCloudKeycloakGroup + - it: should have spec names listKind + asserts: + - equal: + path: spec.names.listKind + value: OzgCloudKeycloakGroupList + - it: should have spec names plural + asserts: + - equal: + path: spec.names.plural + value: ozgcloudkeycloakgroups + - it: should have spec names singular + asserts: + - equal: + path: spec.names.singular + value: ozgcloudkeycloakgroup + + - it: should have spec scope + asserts: + - equal: + path: spec.scope + value: Namespaced \ No newline at end of file diff --git a/ozgcloud-keycloak-operator/src/test/helm/crds/operator.ozgcloud.de_OzgKeycloakGroup_v1_test.yaml b/ozgcloud-keycloak-operator/src/test/helm/crds/operator.ozgcloud.de_OzgKeycloakGroup_v1_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f406e17a709cfc160458ee8599775ff20a2533f4 --- /dev/null +++ b/ozgcloud-keycloak-operator/src/test/helm/crds/operator.ozgcloud.de_OzgKeycloakGroup_v1_test.yaml @@ -0,0 +1,97 @@ +suite: operator.ozgcloud.de_OzgCloudKeycloakGroup versions v1 test +templates: + - templates/crds/operator.ozgcloud.de_OzgKeycloakGroup.yaml +tests: + - it: should have versions name + asserts: + - equal: + path: spec.versions[0].name + value: v1 + - it: should have versions schema description + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.description + value: OzgCloudKeycloakGroup is the Schema for the keycloaks API + - it: should have versions schema type + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.type + value: object + + - it: should have versions schema apiVersion property type + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.apiVersion.type + value: string + - it: should have versions schema apiVersion property description + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.apiVersion.description + value: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + + - it: should have versions schema kind property type + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.kind.type + value: string + - it: should have versions schema kind property description + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.kind.description + value: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + + - it: should have versions schema metadata + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.metadata.type + value: object + + - it: should have versions schema spec description + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.spec.description + value: Spec defines the desired state of Keycloak + - it: should have versions schema spec type + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.spec.type + value: object + - it: should have versions schema spec preserve unknown fields + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.spec.x-kubernetes-preserve-unknown-fields + value: true + + - it: should have versions schema status description + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.status.description + value: Status defines the observed state of Keycloak + - it: should have versions schema status type + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.status.type + value: object + - it: should have versions schema status preserve unknown fields + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.status.x-kubernetes-preserve-unknown-fields + value: true + + - it: should have versions served + asserts: + - equal: + path: spec.versions[0].served + value: true + - it: should have versions storage + asserts: + - equal: + path: spec.versions[0].storage + value: true + - it: should have versions subresources statis + asserts: + - equal: + path: spec.versions[0].subresources.status + value: {} \ No newline at end of file diff --git a/ozgcloud-keycloak-operator/src/test/helm/crds/operator.ozgcloud.de_OzgKeycloakRealms_test.yaml b/ozgcloud-keycloak-operator/src/test/helm/crds/operator.ozgcloud.de_OzgKeycloakRealms_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6ec3b43b2f87a089245b2f19d8c97b7e0d73cd26 --- /dev/null +++ b/ozgcloud-keycloak-operator/src/test/helm/crds/operator.ozgcloud.de_OzgKeycloakRealms_test.yaml @@ -0,0 +1,51 @@ +suite: operator.ozgcloud.de_OzgCloudKeycloakRealms test +templates: + - templates/crds/operator.ozgcloud.de_OzgKeycloakRealms.yaml +tests: + - it: should have apiVersion + asserts: + - equal: + path: apiVersion + value: apiextensions.k8s.io/v1 + - it: should have isKind of + asserts: + - isKind: + of: CustomResourceDefinition + + - it: should have metadata name + asserts: + - equal: + path: metadata.name + value: ozgcloudkeycloakrealms.operator.ozgcloud.de + + - it: should have spec group + asserts: + - equal: + path: spec.group + value: operator.ozgcloud.de + - it: should have spec names kind + asserts: + - equal: + path: spec.names.kind + value: OzgCloudKeycloakRealm + - it: should have spec names listKind + asserts: + - equal: + path: spec.names.listKind + value: OzgCloudKeycloakRealmList + - it: should have spec names plural + asserts: + - equal: + path: spec.names.plural + value: ozgcloudkeycloakrealms + - it: should have spec names singular + asserts: + - equal: + path: spec.names.singular + value: ozgcloudkeycloakrealm + + - it: should have spec scope + asserts: + - equal: + path: spec.scope + value: Namespaced \ No newline at end of file diff --git a/ozgcloud-keycloak-operator/src/test/helm/crds/operator.ozgcloud.de_OzgKeycloakRealms_v1_test.yaml b/ozgcloud-keycloak-operator/src/test/helm/crds/operator.ozgcloud.de_OzgKeycloakRealms_v1_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4dd0be2d8205a1042bb2fe928c5d7aecf9d6b8c9 --- /dev/null +++ b/ozgcloud-keycloak-operator/src/test/helm/crds/operator.ozgcloud.de_OzgKeycloakRealms_v1_test.yaml @@ -0,0 +1,97 @@ +suite: operator.ozgcloud.de_OzgCloudKeycloakRealms versions v1 test +templates: + - templates/crds/operator.ozgcloud.de_OzgKeycloakRealms.yaml +tests: + - it: should have versions name + asserts: + - equal: + path: spec.versions[0].name + value: v1 + - it: should have versions schema description + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.description + value: OzgCloudKeycloakRealm is the Schema for the keycloak API + - it: should have versions schema type + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.type + value: object + + - it: should have versions schema apiVersion property type + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.apiVersion.type + value: string + - it: should have versions schema apiVersion property description + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.apiVersion.description + value: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + + - it: should have versions schema kind property type + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.kind.type + value: string + - it: should have versions schema kind property description + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.kind.description + value: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + + - it: should have versions schema metadata + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.metadata.type + value: object + + - it: should have versions schema spec description + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.spec.description + value: Spec defines the desired state of Keycloak + - it: should have versions schema spec type + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.spec.type + value: object + - it: should have versions schema spec preserve unknown fields + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.spec.x-kubernetes-preserve-unknown-fields + value: true + + - it: should have versions schema status description + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.status.description + value: Status defines the observed state of Keycloak + - it: should have versions schema status type + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.status.type + value: object + - it: should have versions schema status preserve unknown fields + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.status.x-kubernetes-preserve-unknown-fields + value: true + + - it: should have versions served + asserts: + - equal: + path: spec.versions[0].served + value: true + - it: should have versions storage + asserts: + - equal: + path: spec.versions[0].storage + value: true + - it: should have versions subresources statis + asserts: + - equal: + path: spec.versions[0].subresources.status + value: {} \ No newline at end of file diff --git a/ozgcloud-keycloak-operator/src/test/helm/crds/operator.ozgcloud.de_OzgKeycloakUser_test.yaml b/ozgcloud-keycloak-operator/src/test/helm/crds/operator.ozgcloud.de_OzgKeycloakUser_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6070502c7817448a014c20b225fb21a2c7a6b9d8 --- /dev/null +++ b/ozgcloud-keycloak-operator/src/test/helm/crds/operator.ozgcloud.de_OzgKeycloakUser_test.yaml @@ -0,0 +1,51 @@ +suite: operator.ozgcloud.de_OzgCloudKeycloakUser test +templates: + - templates/crds/operator.ozgcloud.de_OzgKeycloakUser.yaml +tests: + - it: should have apiVersion + asserts: + - equal: + path: apiVersion + value: apiextensions.k8s.io/v1 + - it: should have isKind of + asserts: + - isKind: + of: CustomResourceDefinition + + - it: should have metadata name + asserts: + - equal: + path: metadata.name + value: ozgcloudkeycloakusers.operator.ozgcloud.de + + - it: should have spec group + asserts: + - equal: + path: spec.group + value: operator.ozgcloud.de + - it: should have spec names kind + asserts: + - equal: + path: spec.names.kind + value: OzgCloudKeycloakUser + - it: should have spec names listKind + asserts: + - equal: + path: spec.names.listKind + value: OzgCloudKeycloakUserList + - it: should have spec names plural + asserts: + - equal: + path: spec.names.plural + value: ozgcloudkeycloakusers + - it: should have spec names singular + asserts: + - equal: + path: spec.names.singular + value: ozgcloudkeycloakuser + + - it: should have spec scope + asserts: + - equal: + path: spec.scope + value: Namespaced \ No newline at end of file diff --git a/ozgcloud-keycloak-operator/src/test/helm/crds/operator.ozgcloud.de_OzgKeycloakUser_v1_test.yaml b/ozgcloud-keycloak-operator/src/test/helm/crds/operator.ozgcloud.de_OzgKeycloakUser_v1_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..813ebca1ff030b40aa0922c683ae825ddcc5c82a --- /dev/null +++ b/ozgcloud-keycloak-operator/src/test/helm/crds/operator.ozgcloud.de_OzgKeycloakUser_v1_test.yaml @@ -0,0 +1,98 @@ +suite: operator.ozgcloud.de_OzgCloudKeycloakUser versions v1 test +templates: + - templates/crds/operator.ozgcloud.de_OzgKeycloakUser.yaml +tests: + - it: should have versions name + asserts: + - equal: + path: spec.versions[0].name + value: v1 + - it: should have versions schema description + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.description + value: OzgCloudKeycloakUser is the Schema for the keycloaks API + - it: should have versions schema type + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.type + value: object + + - it: should have versions schema apiVersion property type + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.apiVersion.type + value: string + - it: should have versions schema apiVersion property description + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.apiVersion.description + value: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + + - it: should have versions schema kind property type + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.kind.type + value: string + - it: should have versions schema kind property description + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.kind.description + value: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + + + - it: should have versions schema metadata + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.metadata.type + value: object + + - it: should have versions schema spec description + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.spec.description + value: Spec defines the desired state of Keycloak + - it: should have versions schema spec type + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.spec.type + value: object + - it: should have versions schema spec preserve unknown fields + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.spec.x-kubernetes-preserve-unknown-fields + value: true + + - it: should have versions schema status description + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.status.description + value: Status defines the observed state of Keycloak + - it: should have versions schema status type + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.status.type + value: object + - it: should have versions schema status preserve unknown fields + asserts: + - equal: + path: spec.versions[0].schema.openAPIV3Schema.properties.status.x-kubernetes-preserve-unknown-fields + value: true + + - it: should have versions served + asserts: + - equal: + path: spec.versions[0].served + value: true + - it: should have versions storage + asserts: + - equal: + path: spec.versions[0].storage + value: true + - it: should have versions subresources statis + asserts: + - equal: + path: spec.versions[0].subresources.status + value: {} \ No newline at end of file diff --git a/ozgcloud-keycloak-operator/src/test/helm/deployment_env_test.yaml b/ozgcloud-keycloak-operator/src/test/helm/deployment_env_test.yaml index 2da4dfc05c5f5f7cdd60faa4c9d9ff0302830dd0..55882a09d7a3da3ee0a9ce963dc9d3f47b2613b0 100644 --- a/ozgcloud-keycloak-operator/src/test/helm/deployment_env_test.yaml +++ b/ozgcloud-keycloak-operator/src/test/helm/deployment_env_test.yaml @@ -27,6 +27,9 @@ templates: - templates/deployment.yaml set: imagePullSecret: "docker-secret" + image: + name: hase + tag: latest tests: - it: check customList template: deployment.yaml @@ -34,9 +37,6 @@ tests: env.customList: - name: my_test_environment_name value: "A test value" - image: - name: hase - tag: latest asserts: - contains: path: spec.template.spec.containers[0].env diff --git a/ozgcloud-keycloak-operator/src/test/helm/deployment_matchlabels_test.yaml b/ozgcloud-keycloak-operator/src/test/helm/deployment_matchlabels_test.yaml index a7884b3e122395bcad9c173e37c7b6de83af13eb..3c893f8ae21e47cd45df3479987d22f43b9a6534 100644 --- a/ozgcloud-keycloak-operator/src/test/helm/deployment_matchlabels_test.yaml +++ b/ozgcloud-keycloak-operator/src/test/helm/deployment_matchlabels_test.yaml @@ -30,12 +30,11 @@ templates: - templates/deployment.yaml set: imagePullSecret: "docker-secret" + image: + name: hase + tag: latest tests: - it: check matchlabels - set: - image: - name: hase - tag: latest asserts: - equal: path: spec.selector.matchLabels["app.kubernetes.io/name"] diff --git a/ozgcloud-keycloak-operator/src/test/helm/deployment_metadata_labels_test.yaml b/ozgcloud-keycloak-operator/src/test/helm/deployment_metadata_labels_test.yaml index 813f199388e66967dee55efbd0bf32c34764dcc0..22e4a1db37fc246858b7d0373e5da12a6f877187 100644 --- a/ozgcloud-keycloak-operator/src/test/helm/deployment_metadata_labels_test.yaml +++ b/ozgcloud-keycloak-operator/src/test/helm/deployment_metadata_labels_test.yaml @@ -30,12 +30,11 @@ templates: - templates/deployment.yaml set: imagePullSecret: "docker-secret" + image: + name: hase + tag: latest tests: - it: check default labels - set: - image: - name: hase - tag: latest asserts: - equal: path: metadata.labels["app.kubernetes.io/name"] diff --git a/ozgcloud-keycloak-operator/src/test/helm/deployment_pull_secret_test.yaml b/ozgcloud-keycloak-operator/src/test/helm/deployment_pull_secret_test.yaml index eee9267b9a323dbc363d870a0bbb3f33f0ec4724..41f2e531631f376382cf19fe5071ca2bdb6abea8 100644 --- a/ozgcloud-keycloak-operator/src/test/helm/deployment_pull_secret_test.yaml +++ b/ozgcloud-keycloak-operator/src/test/helm/deployment_pull_secret_test.yaml @@ -28,13 +28,13 @@ release: namespace: sh-helm-test templates: - deployment.yaml +set: + image: + name: hase + tag: latest + imagePullSecret: imagePullSecret tests: - it: validate image pull secret resource name - set: - image: - name: hase - tag: latest - imagePullSecret: imagePullSecret asserts: - equal: path: spec.template.spec.imagePullSecrets[0].name diff --git a/ozgcloud-keycloak-operator/src/test/helm/deployment_resources_test.yaml b/ozgcloud-keycloak-operator/src/test/helm/deployment_resources_test.yaml index 01112af2c2b3640468ce8eebce2358f9a8ad78b4..8902036dab84d8957b6661b739b87c5c512d5a72 100644 --- a/ozgcloud-keycloak-operator/src/test/helm/deployment_resources_test.yaml +++ b/ozgcloud-keycloak-operator/src/test/helm/deployment_resources_test.yaml @@ -29,6 +29,9 @@ templates: - templates/deployment.yaml set: imagePullSecret: "docker-secret" + image: + name: hase + tag: latest tests: - it: test resources set: @@ -39,9 +42,6 @@ tests: requests: cpu: "33m" memory: "44Mi" - image: - name: hase - tag: latest asserts: - equal: path: spec.template.spec.containers[0].resources.limits.cpu diff --git a/ozgcloud-keycloak-operator/src/test/helm/deployment_test.yaml b/ozgcloud-keycloak-operator/src/test/helm/deployment_test.yaml index 11f427f1ff91273127e800e23d35841214495454..03891b465b8959cf8104b6aa5b816e453edd6175 100644 --- a/ozgcloud-keycloak-operator/src/test/helm/deployment_test.yaml +++ b/ozgcloud-keycloak-operator/src/test/helm/deployment_test.yaml @@ -30,15 +30,16 @@ templates: - deployment.yaml set: imagePullSecret: "docker-secret" + image: + name: hase + tag: latest tests: - it: validate image type and container image - set: - image: - name: hase - tag: latest asserts: - isKind: of: Deployment + - isAPIVersion: + of: apps/v1 - equal: path: spec.template.spec.containers[0].image value: docker.ozg-sh.de/hase:latest diff --git a/ozgcloud-keycloak-operator/src/test/helm/rbacs/keycloak_admin_secret_read_test.yaml b/ozgcloud-keycloak-operator/src/test/helm/rbacs/keycloak_admin_secret_read_test.yaml index f8110ec01bf2299ea649c18728675592e7a7f1b8..d8275ef581a686fa0c5812eca0a2de7953bc9409 100644 --- a/ozgcloud-keycloak-operator/src/test/helm/rbacs/keycloak_admin_secret_read_test.yaml +++ b/ozgcloud-keycloak-operator/src/test/helm/rbacs/keycloak_admin_secret_read_test.yaml @@ -34,6 +34,8 @@ tests: - isKind: of: RoleBinding documentIndex: 0 + - isAPIVersion: + of: rbac.authorization.k8s.io/v1 - equal: path: metadata.name value: ozgcloud-keycloak-operator-admin-secret-viewer-role-binding @@ -66,6 +68,8 @@ tests: - isKind: of: Role documentIndex: 1 + - isAPIVersion: + of: rbac.authorization.k8s.io/v1 - equal: path: metadata.name value: ozgcloud-keycloak-operator-admin-secret-viewer-role diff --git a/ozgcloud-keycloak-operator/src/test/helm/rbacs/keycloak_read_test.yaml b/ozgcloud-keycloak-operator/src/test/helm/rbacs/keycloak_read_test.yaml index 2a52cf0982d275a62256ead45acc6475bfd94630..641ba7dfb8a4d75561bc51f995363c7861ee68a7 100644 --- a/ozgcloud-keycloak-operator/src/test/helm/rbacs/keycloak_read_test.yaml +++ b/ozgcloud-keycloak-operator/src/test/helm/rbacs/keycloak_read_test.yaml @@ -34,6 +34,8 @@ tests: - isKind: of: ClusterRoleBinding documentIndex: 0 + - isAPIVersion: + of: rbac.authorization.k8s.io/v1 - equal: path: metadata.name value: ozgcloud-keycloak-operator-viewer-role-binding @@ -62,6 +64,8 @@ tests: - isKind: of: ClusterRole documentIndex: 1 + - isAPIVersion: + of: rbac.authorization.k8s.io/v1 - equal: path: metadata.name value: ozgcloud-keycloak-operator-viewer-role diff --git a/ozgcloud-keycloak-operator/src/test/helm/rbacs/keycloak_write_test.yaml b/ozgcloud-keycloak-operator/src/test/helm/rbacs/keycloak_write_test.yaml index 98fe2eb9243a9126110b42fc7b6e36a3881aa5f3..d1970b4272529918ba3901937b7d697afeceb3bf 100644 --- a/ozgcloud-keycloak-operator/src/test/helm/rbacs/keycloak_write_test.yaml +++ b/ozgcloud-keycloak-operator/src/test/helm/rbacs/keycloak_write_test.yaml @@ -34,6 +34,8 @@ tests: - isKind: of: ClusterRoleBinding documentIndex: 0 + - isAPIVersion: + of: rbac.authorization.k8s.io/v1 - equal: path: metadata.name value: ozgcloud-keycloak-operator-write-role-binding @@ -62,6 +64,8 @@ tests: - isKind: of: ClusterRole documentIndex: 1 + - isAPIVersion: + of: rbac.authorization.k8s.io/v1 - equal: path: metadata.name value: ozgcloud-keycloak-operator-write-role