Skip to content

Commit 775762f

Browse files
committed
[c][ck] Add task to delete created group and service
1 parent 1ca3f32 commit 775762f

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

ci/run_cloudkitty_tests.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
ansible.builtin.shell:
4444
cmd: |
4545
{{ openstack_cmd }} rating module list
46-
export SERVICE_NAME=test_service_instance
4746
export GROUP_NAME=test_group_instance_uptime_flavor_id
47+
export SERVICE_NAME=test_service_instance
4848
export FIELD_NAME="flavor_id"
4949
5050
{{ openstack_cmd }} rating hashmap group create $GROUP_NAME || true
@@ -60,3 +60,17 @@
6060
export FLAVOR_ID=$({{ openstack_cmd }} flavor list -f value -c Name -c ID | grep $FLAVOR_NAME | awk '{print $2}')
6161
6262
{{ openstack_cmd }} rating hashmap mapping create 0.01 --field-id $FLAVOR_FIELD_ID --value $FLAVOR_ID -g $GROUP_ID -t flat
63+
ignore_errors: true
64+
65+
- name: Delete the created resources
66+
ansible.builtin.shell:
67+
cmd: |
68+
export GROUP_NAME=test_group_instance_uptime_flavor_id
69+
export SERVICE_NAME=test_service_instance
70+
71+
export GROUP_ID=$({{ openstack_cmd }} rating hashmap group list -f value -c Name -c 'Group ID' | grep $GROUP_NAME| awk '{ print $2}')
72+
export SERVICE_ID=$({{ openstack_cmd }} rating hashmap service list -f value -c Name -c 'Service ID' | grep $SERVICE_NAME | awk '{ print $2 }')
73+
{{ openstack_cmd }} rating hashmap group delete $GROUP_ID
74+
{{ openstack_cmd }} rating hashmap service delete $SERVICE_ID
75+
76+

0 commit comments

Comments
 (0)