#!/usr/bin/env atf-sh . $(atf_get_srcdir)/test_env.sh init_tests \ setup_alpine_usage \ setup_alpine_quick \ setup_alpine_create_answerfile setup_alpine_usage_body() { test_usage setup-alpine } setup_alpine_quick_body() { init_env atf_check -s exit:0 \ -o match:"openrc boot" \ -o match:"openrc default" \ -e empty \ setup-alpine -q } setup_alpine_create_answerfile_body() { init_env atf_check -s exit:0 \ -o match:"Answer file answers has been created" \ setup-alpine -c answers mkdir -p usr/share/zoneinfo/ touch usr/share/zoneinfo/UTC sed -i -e 's/^USERSSHKEY=.*/USERSSHKEY="ssh-rsa blahbla user@example.com"/' \ answers atf_check -s exit:0 \ -o match:"Starting hostname" \ -o match:"Starting mdev" \ -o match:"Added mirror" \ -o match:"adduser" \ -o match:"apk add" \ setup-alpine -f answers grep "ssh-rsa blahbla user@example.com" home/juser/.ssh/authorized_keys \ || atf_fail "ssh key not set for juser" }