Skip to content

Commit 3197864

Browse files
Merge pull request #3095 from Nordix/tero/fix-e2e-data-yaml
🌱 Create ironic.yaml for the e2e tests from a template file
2 parents d7991eb + fcf72d9 commit 3197864

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ build/_test
55
_artifacts
66
artifacts*.tar.gz
77
test/e2e/images
8+
test/e2e/data/ironic-standalone-operator/ironic/base/ironic.yaml
89
out
910

1011
# Created by https://www.gitignore.io/api/go

hack/ci-e2e.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export PATH="/usr/local/go/bin:${PATH}"
5858
"${REPO_ROOT}/hack/e2e/ensure_yq.sh"
5959

6060
sudo apt-get update
61-
sudo apt-get install -y libvirt-dev pkg-config
61+
sudo apt-get install -y libvirt-dev pkg-config gettext-base
6262

6363
# Increase inotify limits to prevent "too many open files" errors.
6464
# Kind nodes (Docker containers running systemd) consume inotify resources heavily.
@@ -225,7 +225,10 @@ IRSO_IRONIC_AUTH_DIR="${REPO_ROOT}/test/e2e/data/ironic-standalone-operator/comp
225225
echo "${IRONIC_USERNAME}" > "${IRSO_IRONIC_AUTH_DIR}/ironic-username"
226226
echo "${IRONIC_PASSWORD}" > "${IRSO_IRONIC_AUTH_DIR}/ironic-password"
227227

228-
sed -i "s|SSH_PUB_KEY_CONTENT|${pub_ssh_key}|" "${REPO_ROOT}"/test/e2e/data/ironic-standalone-operator/ironic/base/ironic.yaml
228+
# shellcheck disable=SC2016
229+
SSH_PUB_KEY_CONTENT="${pub_ssh_key}" envsubst '${SSH_PUB_KEY_CONTENT}' < \
230+
"${REPO_ROOT}/test/e2e/data/ironic-standalone-operator/ironic/base/ironic.yaml.tmpl" > \
231+
"${REPO_ROOT}/test/e2e/data/ironic-standalone-operator/ironic/base/ironic.yaml"
229232

230233
# We need to gather artifacts/logs before exiting also if there are errors
231234
set +e

test/e2e/data/ironic-standalone-operator/ironic/base/ironic.yaml renamed to test/e2e/data/ironic-standalone-operator/ironic/base/ironic.yaml.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ spec:
1818
ipAddress: "192.168.222.2"
1919
ipAddressManager: "keepalived"
2020
deployRamdisk:
21-
sshKey: "SSH_PUB_KEY_CONTENT"
21+
sshKey: "${SSH_PUB_KEY_CONTENT}"
2222
extraKernelParams: "console=ttyS0"

0 commit comments

Comments
 (0)