Skip to content

Commit 1635eff

Browse files
committed
hostaggregate: Add create-full test
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
1 parent 5f37efe commit 1635eff

4 files changed

Lines changed: 54 additions & 0 deletions

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
apiVersion: openstack.k-orc.cloud/v1alpha1
3+
kind: HostAggregate
4+
metadata:
5+
name: hostaggregate-create-full
6+
status:
7+
resource:
8+
name: hostaggregate-create-full-override
9+
conditions:
10+
- type: Available
11+
status: "True"
12+
reason: Success
13+
- type: Progressing
14+
status: "False"
15+
reason: Success
16+
---
17+
apiVersion: kuttl.dev/v1beta1
18+
kind: TestAssert
19+
resourceRefs:
20+
- apiVersion: openstack.k-orc.cloud/v1alpha1
21+
kind: HostAggregate
22+
name: hostaggregate-create-full
23+
ref: hostaggregate
24+
assertAll:
25+
- celExpr: "hostaggregate.status.id != ''"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
apiVersion: openstack.k-orc.cloud/v1alpha1
3+
kind: HostAggregate
4+
metadata:
5+
name: hostaggregate-create-full
6+
spec:
7+
cloudCredentialsRef:
8+
cloudName: openstack-admin
9+
secretName: openstack-clouds
10+
managementPolicy: managed
11+
resource:
12+
name: hostaggregate-create-full-override
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
apiVersion: kuttl.dev/v1beta1
3+
kind: TestStep
4+
commands:
5+
- command: kubectl create secret generic openstack-clouds --from-file=clouds.yaml=${E2E_KUTTL_OSCLOUDS} ${E2E_KUTTL_CACERT_OPT}
6+
namespaced: true
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Create a HostAggregate with all the options
2+
3+
## Step 00
4+
5+
Create a HostAggregate using all available fields, and verify that the observed state corresponds to the spec.
6+
7+
Also validate that the OpenStack resource uses the name from the spec when it is specified.
8+
9+
## Reference
10+
11+
https://k-orc.cloud/development/writing-tests/#create-full

0 commit comments

Comments
 (0)