nuageinit: fix authorized_key test
After miss reading the cloudinit spec I ended up writting a wrong test for basic ssh key setup, nuageinit has been fixed, but not the test, here is the actual fix. Reported by: markj
This commit is contained in:
@@ -173,16 +173,17 @@ EOF
|
||||
config2_pubkeys_body()
|
||||
{
|
||||
here=$(pwd)
|
||||
export NUAGE_FAKE_ROOTDIR=$(pwd)
|
||||
if [ $(id -u) -ne 0 ]; then
|
||||
atf_skip "root required"
|
||||
fi
|
||||
mkdir -p media/nuageinit
|
||||
cat > media/nuageinit/meta_data.json << EOF
|
||||
{
|
||||
"public_keys": {
|
||||
"mykey": "ssh-rsa AAAAB3NzaC1y...== Generated by Nova"
|
||||
},
|
||||
}
|
||||
touch media/nuageinit/meta_data.json
|
||||
cat > media/nuageinit/user-data << EOF
|
||||
#cloud-config
|
||||
|
||||
ssh_authorized_keys:
|
||||
- "ssh-rsa AAAAB3NzaC1y...== Generated by Nova"
|
||||
EOF
|
||||
mkdir -p etc
|
||||
cat > etc/master.passwd <<EOF
|
||||
@@ -194,7 +195,6 @@ EOF
|
||||
wheel:*:0:root
|
||||
users:*:1:
|
||||
EOF
|
||||
export NUAGE_FAKE_ROOTDIR=$(pwd)
|
||||
atf_check /usr/libexec/nuageinit ${here}/media/nuageinit config-2
|
||||
atf_check -o inline:"ssh-rsa AAAAB3NzaC1y...== Generated by Nova\n" cat home/freebsd/.ssh/authorized_keys
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user