Browse Source

Improve testing

master
Teran McKinney 2 years ago
parent
commit
b39622dfff
  1. 4
      test.sh

4
test.sh

@ -33,6 +33,10 @@ fail() {
curl -s --show-error --fail "http://localhost:5555"/list || fail "Should be able to list.."
curl -s --show-error --fail "http://localhost:5555"/list | grep 'debian-9' || fail "debian-9 should be in list"
curl -s --show-error --fail "http://localhost:5555"/list | grep 'debian-9' || fail "debian-9 should be in list"
echo '{"operating_system": "coreos-stable", "ssh_key": "ssh-rsa AAAA"}' | curl -d@- -s --show-error --fail "http://localhost:5555"/ipxe | grep -100 'http' || fail "coreos-stable ipxe failed."
# shellcheck disable=SC2028
echo '{"operating_system": "coreos-stable", "ssh_key": "ssh-rsa AAAA\n"}' | curl -d@- -s --show-error --fail "http://localhost:5555"/ipxe | grep -100 'AAAA\n' && fail "SSH key newline stripping failed."
cleanup

Loading…
Cancel
Save