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: