Fix cloudinit mariadb scenario test error
For now mariadb scenario single test case fails because the script cannot find cloudinit file. This change adds cloudinit file creation if the file doesn't exist. Before this patch we were getting the following message: tee: /etc/trove/cloudinit/mysql.cloudinit: No such file or directory #!/bin/sh ERROR: InvocationError for command /opt/stack/trove/integration/ scripts/trovestack gate-tests mariadb mariadb-supported-single (exited with code 1) Change-Id: Iea74dc2c58b1c4376c698f0084454cfcbb3f3b7d Signed-off-by: Kasper Hasior <k.hasior@samsung.com>
This commit is contained in:
parent
f4e17a34b9
commit
7f7ae90ee9
|
@ -1341,6 +1341,9 @@ function cmd_gate_tests() {
|
|||
CLOUDINIT_PATH=/etc/trove/cloudinit/mysql.cloudinit
|
||||
PUBKEY=`cat ${HOME}/.ssh/id_rsa.pub`
|
||||
|
||||
sudo mkdir -p $(dirname "$CLOUDINIT_PATH")
|
||||
sudo touch "$CLOUDINIT_PATH"
|
||||
|
||||
sudo echo "#!/bin/sh" | sudo tee $CLOUDINIT_PATH
|
||||
sudo echo "" | sudo tee -a $CLOUDINIT_PATH
|
||||
sudo echo "echo '${PUBKEY}' > /home/ubuntu/.ssh/authorized_keys" | sudo tee -a $CLOUDINIT_PATH
|
||||
|
|
Loading…
Reference in New Issue