File tree Expand file tree Collapse file tree
internal/controllers/hostaggregate/tests/hostaggregate-update Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ apiVersion : kuttl.dev/v1beta1
3+ kind : TestAssert
4+ resourceRefs :
5+ - apiVersion : openstack.k-orc.cloud/v1alpha1
6+ kind : HostAggregate
7+ name : hostaggregate-update
8+ ref : hostaggregate
9+ assertAll : []
10+ ---
11+ apiVersion : openstack.k-orc.cloud/v1alpha1
12+ kind : HostAggregate
13+ metadata :
14+ name : hostaggregate-update
15+ status :
16+ resource :
17+ name : hostaggregate-update
18+ # TODO(scaffolding): Add matches for more fields
19+ conditions :
20+ - type : Available
21+ status : " True"
22+ reason : Success
23+ - type : Progressing
24+ status : " False"
25+ reason : Success
Original file line number Diff line number Diff line change 1+ ---
2+ apiVersion : openstack.k-orc.cloud/v1alpha1
3+ kind : HostAggregate
4+ metadata :
5+ name : hostaggregate-update
6+ spec :
7+ cloudCredentialsRef :
8+ cloudName : openstack-admin
9+ secretName : openstack-clouds
10+ managementPolicy : managed
11+ resource : {}
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 1+ ---
2+ apiVersion : openstack.k-orc.cloud/v1alpha1
3+ kind : HostAggregate
4+ metadata :
5+ name : hostaggregate-update
6+ status :
7+ resource :
8+ name : hostaggregate-update-updated
9+ conditions :
10+ - type : Available
11+ status : " True"
12+ reason : Success
13+ - type : Progressing
14+ status : " False"
15+ reason : Success
Original file line number Diff line number Diff line change 1+ ---
2+ apiVersion : openstack.k-orc.cloud/v1alpha1
3+ kind : HostAggregate
4+ metadata :
5+ name : hostaggregate-update
6+ spec :
7+ resource :
8+ name : hostaggregate-update-updated
Original file line number Diff line number Diff line change 1+ ---
2+ apiVersion : kuttl.dev/v1beta1
3+ kind : TestAssert
4+ resourceRefs :
5+ - apiVersion : openstack.k-orc.cloud/v1alpha1
6+ kind : HostAggregate
7+ name : hostaggregate-update
8+ ref : hostaggregate
9+ assertAll : []
10+ ---
11+ apiVersion : openstack.k-orc.cloud/v1alpha1
12+ kind : HostAggregate
13+ metadata :
14+ name : hostaggregate-update
15+ status :
16+ resource :
17+ name : hostaggregate-update
18+ # TODO(scaffolding): validate that updated fields were all reverted to their original value
19+ conditions :
20+ - type : Available
21+ status : " True"
22+ reason : Success
23+ - type : Progressing
24+ status : " False"
25+ reason : Success
Original file line number Diff line number Diff line change 1+ # NOTE: kuttl only does patch updates, which means we can't delete a field.
2+ # We have to use a kubectl apply command instead.
3+ apiVersion : kuttl.dev/v1beta1
4+ kind : TestStep
5+ commands :
6+ - command : kubectl replace -f 00-minimal-resource.yaml
7+ namespaced : true
Original file line number Diff line number Diff line change 1+ # Update HostAggregate
2+
3+ ## Step 00
4+
5+ Create a HostAggregate using only mandatory fields.
6+
7+ ## Step 01
8+
9+ Update all mutable fields.
10+
11+ ## Step 02
12+
13+ Revert the resource to its original value and verify the resulting object is similar to when if was first created.
14+
15+ ## Reference
16+
17+ https://k-orc.cloud/development/writing-tests/#update
You can’t perform that action at this time.
0 commit comments