浏览代码

Update ghost-basics tests for new versions

refs https://github.com/docker-library/ghost/pull/194
- use correct api endpoints for different versions of Ghost
Austin Burdine 6 年之前
父节点
当前提交
e57aa47bb7
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      test/tests/ghost-basics/run.sh

+ 3 - 1
test/tests/ghost-basics/run.sh

@@ -30,6 +30,8 @@ _request() {
 ghostVersion="$(docker inspect --format '{{range .Config.Env}}{{ . }}{{"\n"}}{{end}}' "$serverImage" | awk -F= '$1 == "GHOST_VERSION" { print $2 }')"
 case "$ghostVersion" in
 	0.*) _request GET '/ghost/' -I |tac|tac| grep -q '^Location: .*setup' ;;
-	*)   _request GET '/ghost/api/v0.1/authentication/setup/' |tac|tac| grep -q 'status":false' ;;
+	1.*)   _request GET '/ghost/api/v0.1/authentication/setup/' |tac|tac| grep -q 'status":false' ;;
+	2.*)   _request GET '/ghost/api/v2/admin/authentication/setup/' |tac|tac| grep -q 'status":false' ;;
+	3.*)   _request GET '/ghost/api/v3/admin/authentication/setup/' |tac|tac| grep -q 'status":false' ;;
 esac