Skip to content

Commit

Permalink
Merge pull request #290 from kajinamit/resource-kuttl
Browse files Browse the repository at this point in the history
Add kuttl tests to test KeystoneEndpoint and KeystoneService
  • Loading branch information
openshift-merge-robot authored Aug 2, 2023
2 parents de1108d + 92d191c commit c9159b8
Show file tree
Hide file tree
Showing 14 changed files with 131 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/kuttl/tests/keystone_resources/00-assert.yaml
28 changes: 28 additions & 0 deletions tests/kuttl/tests/keystone_resources/01-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#
# Check for:
#
# - 1 KeystoneAPI CR
# - 1 KeystoneService CR
#
apiVersion: keystone.openstack.org/v1beta1
kind: KeystoneAPI
metadata:
finalizers:
- KeystoneAPI
- KeystoneService-placement
name: keystone
---
apiVersion: keystone.openstack.org/v1beta1
kind: KeystoneService
metadata:
finalizers:
- KeystoneService
name: placement
spec:
enabled: true
passwordSelector: PlacementPassword
secret: osp-secret
serviceDescription: Placement service
serviceName: placement
serviceType: placement
serviceUser: placement
36 changes: 36 additions & 0 deletions tests/kuttl/tests/keystone_resources/02-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#
# Check for:
#
# - 1 KeystoneAPI CR
# - 1 KeystoneService CR
# - 1 KeystoneEndpoint CR
#
apiVersion: keystone.openstack.org/v1beta1
kind: KeystoneAPI
metadata:
finalizers:
- KeystoneAPI
- KeystoneService-placement
- KeystoneEndpoint-placement
name: keystone
---
apiVersion: keystone.openstack.org/v1beta1
kind: KeystoneService
metadata:
finalizers:
- KeystoneService
- KeystoneEndpoint-placement
name: placement
---
apiVersion: keystone.openstack.org/v1beta1
kind: KeystoneEndpoint
metadata:
finalizers:
- KeystoneEndpoint
name: placement
spec:
endpoints:
admin: http://placement-admin-openstack.apps-crc.testing
internal: http://placement-internal-openstack.apps-crc.testing
public: http://placement-public-openstack.apps-crc.testing
serviceName: placement
20 changes: 20 additions & 0 deletions tests/kuttl/tests/keystone_resources/03-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# Check for:
#
# - 1 KeystoneAPI CR
# - 1 KeystoneService CR
#
apiVersion: keystone.openstack.org/v1beta1
kind: KeystoneAPI
metadata:
finalizers:
- KeystoneAPI
- KeystoneService-placement
name: keystone
---
apiVersion: keystone.openstack.org/v1beta1
kind: KeystoneService
metadata:
finalizers:
- KeystoneService
name: placement
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
delete:
- apiVersion: keystone.openstack.org/v1beta1
kind: KeystoneEndpoint
name: placement
9 changes: 9 additions & 0 deletions tests/kuttl/tests/keystone_resources/03-errors.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# Check for:
#
# - No KeystoneEndpoint CR
#
apiVersion: keystone.openstack.org/v1beta1
kind: KeystoneEndpoint
metadata:
name: placement
11 changes: 11 additions & 0 deletions tests/kuttl/tests/keystone_resources/04-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#
# Check for:
#
# - 1 KeystoneAPI CR
#
apiVersion: keystone.openstack.org/v1beta1
kind: KeystoneAPI
metadata:
finalizers:
- KeystoneAPI
name: keystone
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
delete:
- apiVersion: keystone.openstack.org/v1beta1
kind: KeystoneService
name: placement
9 changes: 9 additions & 0 deletions tests/kuttl/tests/keystone_resources/04-errors.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# Check for:
#
# - No KeystoneService CR
#
apiVersion: keystone.openstack.org/v1beta1
kind: KeystoneService
metadata:
name: placement
1 change: 1 addition & 0 deletions tests/kuttl/tests/keystone_resources/05-errors.yaml

0 comments on commit c9159b8

Please sign in to comment.