diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index d5b33e52b..bbd8dbf2b 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -21,7 +21,7 @@ jobs: ports: - 8500:8500 etcd: - image: quay.io/coreos/etcd + image: quay.io/coreos/etcd:v3.5.13 ports: - 2379:2379 env: diff --git a/Dockerfile b/Dockerfile index 9f1026394..a59f5e1ec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21.6-alpine +FROM golang:1.22.2-alpine RUN apk add --no-cache make git RUN mkdir -p /go/src/github.com/abtreece/confd && \ diff --git a/test/docker-compose.yml b/test/docker-compose.yml index e667c63c2..a0b492353 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -1,12 +1,11 @@ -version: "3.9" services: consul: - image: consul + image: hashicorp/consul ports: - 8500:8500 etcd: - image: quay.io/coreos/etcd + image: quay.io/coreos/etcd:v3.5.13 ports: - 2379:2379 environment: @@ -26,7 +25,7 @@ services: - 6379:6379 vault: - image: vault + image: hashicorp/vault ports: - 8200:8200 environment: diff --git a/test/integration/expect/check.sh b/test/integration/expect/check.sh index ff3706fbc..290cb6447 100755 --- a/test/integration/expect/check.sh +++ b/test/integration/expect/check.sh @@ -5,5 +5,8 @@ diff /tmp/confd-basic-test.conf test/integration/expect/basic.conf diff /tmp/confd-exists-test.conf test/integration/expect/exists-test.conf diff /tmp/confd-iteration-test.conf test/integration/expect/iteration.conf diff /tmp/confd-manykeys-test.conf test/integration/expect/basic.conf +if [ -f /tmp/confd-nested-test.conf ]; then + diff /tmp/confd-nested-test.conf test/integration/expect/nested.conf +fi rm /tmp/confd-*; diff --git a/test/integration/expect/nested.conf b/test/integration/expect/nested.conf new file mode 100644 index 000000000..7ad26a03a --- /dev/null +++ b/test/integration/expect/nested.conf @@ -0,0 +1,15 @@ +upstream app { + server 10.0.1.10:8080; + server 10.0.1.11:8080; +} + +server { + server_name www.example.com; + location / { + proxy_pass http://app; + proxy_redirect off; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } +} \ No newline at end of file