diff --git a/test/fixtures/binarylane/_api_assertions.sh b/test/fixtures/binarylane/_api_assertions.sh new file mode 100644 index 00000000..1a37952f --- /dev/null +++ b/test/fixtures/binarylane/_api_assertions.sh @@ -0,0 +1,2 @@ +assert_api_called "GET" "/account/keys" "fetches SSH keys" +assert_api_called "POST" "/servers" "creates server" diff --git a/test/fixtures/genesiscloud/_api_assertions.sh b/test/fixtures/genesiscloud/_api_assertions.sh new file mode 100644 index 00000000..0ff31fdb --- /dev/null +++ b/test/fixtures/genesiscloud/_api_assertions.sh @@ -0,0 +1,2 @@ +assert_api_called "GET" "/ssh-keys" "fetches SSH keys" +assert_api_called "POST" "/instances" "creates instance" diff --git a/test/fixtures/hyperstack/_api_assertions.sh b/test/fixtures/hyperstack/_api_assertions.sh new file mode 100644 index 00000000..6e36b37c --- /dev/null +++ b/test/fixtures/hyperstack/_api_assertions.sh @@ -0,0 +1,2 @@ +assert_api_called "GET" "/ssh-keys" "fetches SSH keys" +assert_api_called "POST" "/servers" "creates server" diff --git a/test/fixtures/kamatera/_api_assertions.sh b/test/fixtures/kamatera/_api_assertions.sh new file mode 100644 index 00000000..ef227032 --- /dev/null +++ b/test/fixtures/kamatera/_api_assertions.sh @@ -0,0 +1,2 @@ +assert_api_called "GET" "/svc/config/sshkey/list" "fetches SSH keys" +assert_api_called "POST" "/svc/server/create" "creates server" diff --git a/test/fixtures/latitude/_api_assertions.sh b/test/fixtures/latitude/_api_assertions.sh new file mode 100644 index 00000000..6e36b37c --- /dev/null +++ b/test/fixtures/latitude/_api_assertions.sh @@ -0,0 +1,2 @@ +assert_api_called "GET" "/ssh-keys" "fetches SSH keys" +assert_api_called "POST" "/servers" "creates server" diff --git a/test/fixtures/ovh/_api_assertions.sh b/test/fixtures/ovh/_api_assertions.sh new file mode 100644 index 00000000..96c9a077 --- /dev/null +++ b/test/fixtures/ovh/_api_assertions.sh @@ -0,0 +1,2 @@ +assert_api_called "GET" "/me/sshKey" "fetches SSH keys" +assert_api_called "POST" "/cloud/project" "interacts with cloud project" diff --git a/test/fixtures/scaleway/_api_assertions.sh b/test/fixtures/scaleway/_api_assertions.sh new file mode 100644 index 00000000..6c1bd5f6 --- /dev/null +++ b/test/fixtures/scaleway/_api_assertions.sh @@ -0,0 +1,2 @@ +assert_api_called "GET" "/sshkeys" "fetches SSH keys" +assert_api_called "POST" "/servers" "creates server" diff --git a/test/fixtures/upcloud/_api_assertions.sh b/test/fixtures/upcloud/_api_assertions.sh new file mode 100644 index 00000000..7da930b5 --- /dev/null +++ b/test/fixtures/upcloud/_api_assertions.sh @@ -0,0 +1,2 @@ +assert_api_called "GET" "/1.3/account" "fetches account info" +assert_api_called "POST" "/1.3/server" "creates server" diff --git a/test/mock.sh b/test/mock.sh index ee6e4128..a46ab155 100644 --- a/test/mock.sh +++ b/test/mock.sh @@ -299,9 +299,17 @@ _validate_body() { vultr) case "$EP_CLEAN" in /instances) _check_fields "label region plan os_id" ;; esac ;; linode) case "$EP_CLEAN" in /linode/instances) _check_fields "label region type image" ;; esac ;; civo) case "$EP_CLEAN" in /instances) _check_fields "hostname size region" ;; esac ;; + binarylane) case "$EP_CLEAN" in /servers) _check_fields "name region plan os_id" ;; esac ;; + upcloud) case "$EP_CLEAN" in /server) _check_fields "server" ;; esac ;; + genesiscloud) case "$EP_CLEAN" in /instances) _check_fields "name" ;; esac ;; + hyperstack) case "$EP_CLEAN" in /servers) _check_fields "name" ;; esac ;; + kamatera) case "$EP_CLEAN" in /server/create) _check_fields "datacenter" ;; esac ;; + latitude) case "$EP_CLEAN" in /servers) _check_fields "hostname site_id os_type" ;; esac ;; + ovh) case "$EP_CLEAN" in */create) _check_fields "name" ;; esac ;; + scaleway) case "$EP_CLEAN" in /servers) _check_fields "name" ;; esac ;; webdock) case "$EP_CLEAN" in /servers) _check_fields "name slug locationId profileSlug imageSlug" ;; esac ;; serverspace) case "$EP_CLEAN" in /servers) _check_fields "name location_id image_id cpu ram_mb" ;; esac ;; - gcore) case "$EP_CLEAN" in /instances) _check_fields "name flavor volumes interfaces" ;; esac !! + gcore) case "$EP_CLEAN" in /instances) _check_fields "name flavor volumes interfaces" ;; esac ;; esac }