Skip to content

Commit

Permalink
activation tests fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Akasurde committed Aug 19, 2024
1 parent 08d98f5 commit 9336ec8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
1 change: 1 addition & 0 deletions .config/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@ hdrs
testuser
testsecret
keygen
testpass
26 changes: 0 additions & 26 deletions tests/integration/targets/activation/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
---
- block:
- set_fact:
credential_defaults: &credential_defaults
controller_username: "{{ controller_username }}"
controller_password: "{{ controller_password }}"
controller_host: "{{ controller_host }}"
validate_certs: false

- name: Generate a random_string for the test
set_fact:
random_string: "{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
Expand All @@ -32,15 +25,13 @@

- name: Create an AWX controller token
ansible.eda.controller_token:
<<: *credential_defaults
name: "{{ awx_token_name }}"
description: "A test AWX controller token description"
token: "{{ token_value }}"
state: present

- name: Create a new credential type
ansible.eda.credential_type:
<<: *credential_defaults
name: "{{ credential_type_name }}"
state: present
description: "A test credential type"
Expand Down Expand Up @@ -88,7 +79,6 @@

- name: Create a new SCM credential
ansible.eda.credential:
<<: *credential_defaults
name: "{{ credential_name }}"
state: present
credential_type_name: Source Control
Expand All @@ -107,7 +97,6 @@

- name: Create a new project
ansible.eda.project:
<<: *credential_defaults
name: "{{ project_name }}"
description: "Test Project Description"
url: "{{ scm_url }}"
Expand All @@ -123,7 +112,6 @@

- name: Create a new decision environment
ansible.eda.decision_environment:
<<: *credential_defaults
name: "{{ decision_env_name }}"
description: "Test Decision Environment Description"
credential: "{{ credential_name }}"
Expand All @@ -132,7 +120,6 @@

- name: Create a new rulebook activation in check mode
ansible.eda.activation:
<<: *credential_defaults
name: "{{ activation_name }}"
description: "Example Activation description"
project_name: "{{ project_name }}"
Expand All @@ -150,7 +137,6 @@

- name: Create a new rulebook activation
ansible.eda.activation:
<<: *credential_defaults
name: "{{ activation_name }}"
description: "Example Activation description"
project_name: "{{ project_name }}"
Expand All @@ -167,7 +153,6 @@

- name: Create a new rulebook activation again
ansible.eda.activation:
<<: *credential_defaults
name: "{{ activation_name }}"
description: "Example Activation description"
project_name: "{{ project_name }}"
Expand All @@ -185,16 +170,13 @@

- name: Get information about the rulebook activation
ansible.eda.activation_info:
<<: *credential_defaults
name: "{{ activation_name }}"

- name: List all the rulebook activations
ansible.eda.activation_info:
<<: *credential_defaults

- name: Delete project
ansible.eda.project:
<<: *credential_defaults
name: "{{ project_name }}"
state: absent
register: project_deletion
Expand All @@ -207,7 +189,6 @@

- name: Delete credential
ansible.eda.credential:
<<: *credential_defaults
name: "{{ credential_name }}"
state: absent
register: credential_deletion
Expand All @@ -220,49 +201,42 @@

- name: Delete rulebook activation
ansible.eda.activation:
<<: *credential_defaults
name: "{{ activation_name }}"
state: absent

always:
- name: Delete AWX token
ansible.eda.controller_token:
<<: *credential_defaults
name: "{{ awx_token_name }}"
state: absent
ignore_errors: true

- name: Delete project
ansible.eda.project:
<<: *credential_defaults
name: "{{ project_name }}"
state: absent
ignore_errors: true

- name: Delete decision environment
ansible.eda.decision_environment:
<<: *credential_defaults
name: "{{ decision_env_name }}"
state: absent
ignore_errors: true

- name: Delete credential
ansible.eda.credential:
<<: *credential_defaults
name: "{{ credential_name }}"
state: absent
ignore_errors: true

- name: Delete credential type
ansible.eda.credential_type:
<<: *credential_defaults
name: "{{ credential_type_name }}"
state: absent
ignore_errors: true

- name: Delete rulebook activation
ansible.eda.activation:
<<: *credential_defaults
name: "{{ activation_name }}"
state: absent
ignore_errors: true

0 comments on commit 9336ec8

Please sign in to comment.