Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Commit

Permalink
test: updates for a stable branch for testing farm
Browse files Browse the repository at this point in the history
Signed-off-by: Wei Shi <[email protected]>
  • Loading branch information
shi2wei3 committed Feb 1, 2024
1 parent c99ff04 commit ca667af
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
4 changes: 2 additions & 2 deletions os-replace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ case "$TEST_OS" in
SSH_USER="cloud-user"
sed "s/REPLACE_ME/${DOWNLOAD_NODE}/g" files/rhel-9-4.template | tee rhel-9-4.repo > /dev/null
ADD_REPO="COPY rhel-9-4.repo /etc/yum.repos.d/rhel-9-4.repo"
sed "s/REPLACE_ME/${QUAY_SECRET}/g" files/auth.template | tee auth.json > /dev/null
sed "s/REPLACE_ME/$(echo -n "${QUAY_USERNAME}:${QUAY_PASSWORD}" | base64 -w 0)/g" files/auth.template | tee auth.json > /dev/null
ADD_AUTH="COPY auth.json /etc/ostree/auth.json"
if [[ "$PLATFORM" == "aws" ]]; then
SSH_USER="ec2-user"
Expand Down Expand Up @@ -65,7 +65,7 @@ case "$TEST_OS" in
esac

TEST_IMAGE_NAME="${IMAGE_NAME}-os_replace"
TEST_IMAGE_URL="quay.io/${QUAY_USERNAME}/${TEST_IMAGE_NAME}:${QUAY_REPO_TAG}"
TEST_IMAGE_URL="quay.io/redhat_emp1/${TEST_IMAGE_NAME}:${QUAY_REPO_TAG}"

greenprint "Create $TEST_OS installation Containerfile"
tee "$INSTALL_CONTAINERFILE" > /dev/null << EOF
Expand Down
2 changes: 1 addition & 1 deletion playbooks/deploy-openstack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
download_node: "{{ lookup('env', 'DOWNLOAD_NODE') | default('', true) }}"
images:
rhel-9-4: RHEL-9.4.0-x86_64-nightly-latest
centos-stream-9: edge-centos-stream-9
centos-stream-9: CentOS-Stream-9-latest

tasks:
- set_fact:
Expand Down
7 changes: 3 additions & 4 deletions tmt/plans/all.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ prepare:
pip install boto3 botocore openstacksdk
ansible-galaxy collection install openstack.cloud community.general amazon.aws ansible.posix
- how: shell
script: curl "https://awscli.amazonaws.com/awscli-exe-linux-${ARCH}.zip" -o "awscliv2.zip" && unzip awscliv2.zip && sudo ./aws/install
script: curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip" && unzip awscliv2.zip && sudo ./aws/install
execute:
how: tmt

Expand All @@ -29,12 +29,11 @@ execute:
discover+:
test: os-replace
- when: arch != x86_64
discover+:
test: N/A
enabled: false

/gcp:
summary: Run os-replace test on gcp
tag: gcp
tag: [gcp, stable]
environment+:
PLATFORM: gcp
prepare+:
Expand Down
2 changes: 1 addition & 1 deletion tmt/tests/os-replace.fmf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
test: ./test.sh
duration: 20m
duration: 30m
environment:
TEST_CASE: os-replace
15 changes: 11 additions & 4 deletions tmt/tests/test.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
#!/bin/sh
#!/bin/bash

cd ../../
ARCH=$(uname -m)
export ARCH
COMPONENT_NAME=$(echo -n "${SNAPSHOT}" | base64 -d | jq -r .components[0].name)
CONTAINER_IMAGE=$(echo -n "${SNAPSHOT}" | base64 -d | jq -r .components[0].containerImage)
echo "${SNAPSHOT}"
echo "${COMPONENT_NAME}"
echo "${CONTAINER_IMAGE}"

if [ "$TEST_CASE" = "os-replace" ]; then
./os-replace.sh
./os-replace.sh
else
echo "Error: Test case $TEST_CASE not found!"
exit 1
echo "Error: Test case $TEST_CASE not found!"
exit 1
fi

0 comments on commit ca667af

Please sign in to comment.