Skip to content

Commit

Permalink
Don't use k8s wait for alt namespace test
Browse files Browse the repository at this point in the history
  • Loading branch information
andykrohg committed Feb 17, 2021
1 parent cd0b895 commit 4f0e7f5
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions molecule/default/tasks/gitea_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,24 +88,28 @@
state: present
namespace: '{{ namespace }}-alt'
definition: "{{ lookup('template', '/'.join([samples_dir, cr_file])) | from_yaml | combine(namespace_mod) }}"
wait: yes
wait_timeout: 300
wait_condition:
type: Running
reason: Successful
status: "True"
vars:
cr_file: 'redhatgov_v1alpha1_gitea_molecule.yaml'
namespace_mod:
metadata:
namespace: '{{ namespace }}-alt'
name: gitea-sample-alt
ignore_errors: true

- name: Wait for CR to be Reconciled
k8s_info:
api_version: v1alpha1
kind: Gitea
namespace: '{{ namespace }}-alt'
name: gitea-sample-alt
register: namespace_modded_cr
until: namespace_modded_cr.resources[0].status | json_query("conditions[?(@.reason=='Successful')]")
retries: 5
delay: 60
ignore_errors: true

- name: Verify that Gitea failed to be created from the CR when appropriate
assert:
that: namespace_modded_cr.failed == (scope == "namespace")
that: namespace_modded_cr.resources[0].status is not defined == (scope == "namespace")

# TODO:
# - Validate Gitea can be used

0 comments on commit 4f0e7f5

Please sign in to comment.