Skip to content

Commit

Permalink
ign smoke tests
Browse files Browse the repository at this point in the history
Signed-off-by: Antonio Murdaca <antoniomurdaca@gmail.com>
  • Loading branch information
runcom committed Nov 29, 2022
1 parent fdd0e9a commit 16d58ab
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions test/cases/ostree-simplified-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,79 @@ sudo mount -o loop "${ISO_FILENAME}" /mnt/installer
sudo cp -R /mnt/installer/* ${HTTPD_PATH}/httpboot/
sudo chmod -R +r ${HTTPD_PATH}/httpboot/*

# TODO(runcom): change this to butane to check that too
# also, write the very same test for ostree-raw-image
IGN_PATH="${HTTPD_PATH}/ignition"
sudo mkdir -p ${IGN_PATH}
IGN_CONFIG_PATH="${IGN_PATH}/config.ign"
tee "$IGN_CONFIG_PATH" > /dev/null << EOF
{
"ignition": {
"config": {
"merge": [
{
"source": "http://192.168.100.1/ignition/sample.ign"
}
]
},
"timeouts": {
"httpTotal": 30
},
"version": "3.3.0"
},
"passwd": {
"users": [
{
"groups": [
"wheel"
],
"name": "core",
"passwordHash": "\$6\$jfuNnO9t1Bv7N.7k\$HqRxq2bltR3zMyAHjsSzbe7uBHXErO1Yvqpi6ljcI06dQBkfWXXZCuE.mJcklPTwaA9r/xpJiEdWDqtxle7h81"
}
]
}
}
EOF

IGN_CONFIG_SAMPLE_PATH="${IGN_PATH}/sample.ign"
tee "$IGN_CONFIG_SAMPLE_PATH" > /dev/null << EOF
{
"ignition": {
"version": "3.3.0"
},
"storage": {
"files": [
{
"path": "/usr/local/bin/startup.sh",
"contents": {
"compression": "",
"source": "data:;base64,IyEvYmluL2Jhc2gKZWNobyAiSGVsbG8sIFdvcmxkISIK"
},
"mode": 493
}
]
},
"systemd": {
"units": [
{
"contents": "[Unit]\nDescription=A hello world unit!\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/usr/local/bin/startup.sh\n[Install]\nWantedBy=multi-user.target\n",
"enabled": true,
"name": "hello.service"
},
{
"dropins": [
{
"contents": "[Service]\nEnvironment=LOG_LEVEL=trace\n",
"name": "log_trace.conf"
}
],
"name": "fdo-client-linuxapp.service"
}
]
}
}
EOF

greenprint "📋 Update grub.cfg file for http boot"
sudo sed -i 's/timeout=60/timeout=10/' "${GRUB_CFG}"
sudo sed -i 's/coreos.inst.install_dev=\/dev\/sda/coreos.inst.install_dev=\/dev\/vda/' "${GRUB_CFG}"
Expand Down

0 comments on commit 16d58ab

Please sign in to comment.