From 2f8fc1876b4d51cb53a5a4e9fba939aed3c2b7c9 Mon Sep 17 00:00:00 2001 From: Tim Dawson Date: Tue, 20 Jul 2021 01:37:08 +1200 Subject: [PATCH] Added curl to create zone --- .circleci/config.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 820929c..288cd04 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ # Use the latest 2.1 version of CircleCI pipeline process engine. See: https://circleci.com/docs/2.0/configuration-reference version: 2.1 jobs: - build: + test: working_directory: ~/repo docker: - image: circleci/golang:1.16 @@ -22,7 +22,7 @@ jobs: - "--webserver-loglevel=detailed" - "--loglevel=10" - "--log-dns-queries=yes" - - "--master" + - "--master=yes" - "--disable-syslog" - "--webserver-address=0.0.0.0" - "--webserver-allow-from=0.0.0.0/0" @@ -43,6 +43,8 @@ jobs: - run: name: Run tests command: | + while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8080)" != "200" ]]; do sleep 3; done + curl -sv -X post -H 'X-API-Key: password' --data '{"id":"example.com.","name":"example.com.", "type": "zone", "kind": "native"}' http://localhost:8080/api/v1/servers/localhost/zones mkdir -p /tmp/test-reports env TEST_ZONE_NAME=example.com. gotestsum --junitfile /tmp/test-reports/unit-tests.xml - store_test_results: