Skip to content

Commit 04a837e

Browse files
committed
Fix EE test mounting license as a directory
See https://stackoverflow.com/questions/42248198/how-to-mount-a-single-file-in-a-volume I noticed that the Gitlab-license.txt file was being replaced by an empty directory of the same name. Changing the volume to an absolute path has fixed it.
1 parent 6bf68ef commit 04a837e

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ services:
1616
- config-ce:/etc/gitlab
1717
- logs-ce:/var/log/gitlab
1818
- data-ce:/var/opt/gitlab
19-
- ./scripts/healthcheck-and-setup.sh:/healthcheck-and-setup.sh
19+
- ${PWD}/scripts/healthcheck-and-setup.sh:/healthcheck-and-setup.sh
2020
healthcheck:
2121
test: /healthcheck-and-setup.sh
2222
interval: 10s
@@ -36,8 +36,8 @@ services:
3636
- config-ee:/etc/gitlab
3737
- logs-ee:/var/log/gitlab
3838
- data-ee:/var/opt/gitlab
39-
- ./scripts/healthcheck-and-setup.sh:/healthcheck-and-setup.sh
40-
- ./Gitlab-license.txt:/Gitlab-license.txt
39+
- ${PWD}/scripts/healthcheck-and-setup.sh:/healthcheck-and-setup.sh
40+
- ${PWD}/Gitlab-license.txt:/Gitlab-license.txt
4141
healthcheck:
4242
test: /healthcheck-and-setup.sh
4343
interval: 10s

scripts/await-healthy.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
#!/usr/bin/env sh
22

3-
echo 'Waiting for GitLab container to become healthy'
3+
printf 'Waiting for GitLab container to become healthy'
44

55
until test -n "$(docker ps --quiet --filter label=terraform-provider-gitlab/owned --filter health=healthy)"; do
66
printf '.'
77
sleep 5
88
done
99

10+
echo
1011
echo 'GitLab is healthy'
12+
13+
# Print the version, since it is useful debugging information.
14+
curl --silent --show-error --header 'PRIVATE-TOKEN: ACCTEST' http://127.0.0.1:8080/api/v4/version
15+
echo

0 commit comments

Comments
 (0)