summaryrefslogtreecommitdiff
path: root/.circleci/test-run.sh
diff options
context:
space:
mode:
Diffstat (limited to '.circleci/test-run.sh')
-rw-r--r--.circleci/test-run.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/.circleci/test-run.sh b/.circleci/test-run.sh
new file mode 100644
index 0000000..dafef6f
--- /dev/null
+++ b/.circleci/test-run.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# Test that the configuration runs.
+
+set -ex
+
+cd /go/src/github.com/ponzu-cms/ci/test-project
+
+ponzu run --dev-https &
+
+# Smoke test
+sleep 2
+curl -Lk https://localhost:10443/admin | grep https://www.bosssauce.it
+
+# Run unit tests
+touch cookies
+
+# Create initial admin user
+curl -v --cookie-jar cookies \
+ -d "name=Test&domain=localhost&email=test@ponzu-cms.org&password=ponzu" \
+ -X POST localhost:8080/admin/init
+
+#Test that content types were generated
+curl -b cookies -c cookies http://localhost:8080/admin/contents?type=Person \
+ | grep Person \ No newline at end of file