Skip to content

Commit

Permalink
need a valid user
Browse files Browse the repository at this point in the history
Issue: AAH-2421
  • Loading branch information
bmclaughlin committed Feb 6, 2024
1 parent 2909148 commit 29a2a6c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
8 changes: 4 additions & 4 deletions dev/galaxy_collection_plays/vars.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ah_host: http://localhost:55001
ah_username: iqe_admin
ah_password: redhat
ah_path_prefix: automation-hub
ah_artifact_runner_absolute_path: /home/runner/work/galaxy_ng/galaxy_ng/galaxy_collection/galaxy-galaxy-1.0.0.tar.gz
ah_username: admin
ah_password: admin
ah_path_prefix: galaxy
ah_artifact_runner_absolute_path: /src/galaxy_collection_test/galaxy-galaxy-1.0.0.tar.gz
19 changes: 10 additions & 9 deletions dev/oci_env_integration/actions/action_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class OCIEnvIntegrationTest:
env_file (string, required): oci-env env file to use for the tests. These are all loaded
from dev/oci_env_integration/oci_env_configs
run_tests (boolean, required): if true, integration tests will be run inside this instance
run_playbooks (boolean, required): if true, Galaxy Collection playbook tests will be run inside this instance
run_playbooks (boolean, required): if true, Galaxy Collection playbook tests will be run
inside this instance
db_restore (string, optional): database backup to restore before running tests These are all
loaded from dev/oci_env_integration/oci_env_configs. When defining this, omit
the file extension (ex: fixture, not fixtur.tar.gz)
Expand Down Expand Up @@ -132,20 +133,20 @@ def run_test(self):
def install_galaxy_collection(self, env):
self.exec_cmd(
env,
"exec git clone https://github.com/ansible/galaxy_collection /src/galaxy_collection_test"
"exec git clone https://github.com/ansible/galaxy_collection /src/galaxy_collection_test" # noqa E501
)

# The ansible.cfg defined in the collection repository might break the test. We want the same variables for installation and running.
# The ansible.cfg defined in the collection repository might break the test.
# We want the same variables for installation and running.
self.exec_cmd(env, "exec rm -f /src/galaxy_collection_test/ansible.cfg")
self.exec_cmd(env, "exec rm -f /src/galaxy_collection_test/galaxy.yml")
self.exec_cmd(env, "exec mv /src/galaxy_collection_test/.github/files/galaxy.yml.j2 /src/galaxy_collection_test/")
self.exec_cmd(env, "exec mv /src/galaxy_collection_test/.github/files/galaxy.yml.j2 /src/galaxy_collection_test/") # noqa E501
self.exec_cmd(
env,
'exec ansible all -i localhost, -c local -m template -a "src=/src/galaxy_collection_test/galaxy.yml.j2 dest=/src/galaxy_collection_test/galaxy.yml" -e collection_namespace=galaxy -e collection_name=galaxy -e collection_version=1.0.0 -e collection_repo=https://github.com/ansible/automation_hub_collection'
'exec ansible all -i localhost, -c local -m template -a "src=/src/galaxy_collection_test/galaxy.yml.j2 dest=/src/galaxy_collection_test/galaxy.yml" -e collection_namespace=galaxy -e collection_name=galaxy -e collection_version=1.0.0 -e collection_repo=https://github.com/ansible/automation_hub_collection' # noqa E501
)
self.exec_cmd(env, "exec ansible-galaxy collection build --output-path /src/galaxy_collection_test/ /src/galaxy_collection_test/ -vvv")
self.exec_cmd(env, "exec ansible-galaxy collection install /src/galaxy_collection_test/galaxy-galaxy-1.0.0.tar.gz -vvv --force")
self.exec_cmd(env, "exec rm -rf /src/galaxy_collection_test")
self.exec_cmd(env, "exec ansible-galaxy collection build --output-path /src/galaxy_collection_test/ /src/galaxy_collection_test/ -vvv") # noqa E501
self.exec_cmd(env, "exec ansible-galaxy collection install /src/galaxy_collection_test/galaxy-galaxy-1.0.0.tar.gz -vvv --force") # noqa E501

def run_playbooks(self):
for env in self.envs:
Expand All @@ -161,7 +162,7 @@ def run_playbooks(self):
print(f"testing the {playbook} playbook")
self.exec_cmd(
env,
f"exec ansible-playbook src/galaxy_ng/dev/galaxy_collection_plays/{playbook} -vvv"
f"exec ansible-playbook src/galaxy_ng/dev/galaxy_collection_plays/{playbook} -vvv" # noqa E501
)

def dump_logs(self):
Expand Down

0 comments on commit 29a2a6c

Please sign in to comment.