From 178f7ee0d1e8192c19142fd45c3b0c0106e32e65 Mon Sep 17 00:00:00 2001 From: Lenka Segura Date: Sep 25 2022 14:43:28 +0000 Subject: Communishift: Add molecule test of fasjson --- diff --git a/CommunishiftAuthorization/molecule/default/tasks/communishiftauthorization_test.yml b/CommunishiftAuthorization/molecule/default/tasks/communishiftauthorization_test.yml index 8526cef..fd2ee31 100644 --- a/CommunishiftAuthorization/molecule/default/tasks/communishiftauthorization_test.yml +++ b/CommunishiftAuthorization/molecule/default/tasks/communishiftauthorization_test.yml @@ -55,3 +55,21 @@ - assert: that: - "'FEDORAPROJECT.ORG' in klist_output.stdout" + +- block: + - name: 'TEST: query fasjson and confirm there is a communishift group' + kubernetes.core.k8s_exec: + namespace: "{{ namespace }}" + pod: "{{ cao_pod_name }}" + command: 'curl --negotiate -u : https://fasjson.fedoraproject.org/v1/groups/communishift/' + register: curl_response + + - set_fact: + group_result: "{{ curl_response.stdout }}" + + - set_fact: + groupname: "{{ group_result.result.groupname }}" + + - assert: + that: + - "'communishift' in groupname"