Skip to content

Commit 5850e76

Browse files
author
Jacob Truman
committed
XENG-8909 Add test for service container communication
1 parent 6c5da91 commit 5850e76

File tree

4 files changed

+24
-5
lines changed

4 files changed

+24
-5
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
ARG DOCKER_REGISTRY
22
FROM $DOCKER_REGISTRY/rockylinux:8.5
3-
RUN yum -y install curl
3+
RUN mkdir /results
4+
VOLUME /results

tests/test-files/test-general-buildx.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,6 @@ steps:
104104
image: {{ DOCKER_REGISTRY }}/rockylinux:8.5
105105
cmd: 'echo "hello" > /hello.txt'
106106
post-build:
107-
# use a different container here to make sure inject overrides
108-
#path: runservicecontainer
109107
inject:
110108
'tests/postbuildpath/Dockerfile': '/'
111109
push:

tests/test-files/test-general.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@ steps:
105105
image: {{ DOCKER_REGISTRY }}/rockylinux:8.5
106106
cmd: 'echo "hello" > /hello.txt'
107107
post-build:
108-
# use a different container here to make sure inject overrides
109-
#path: runservicecontainer
110108
inject:
111109
'tests/postbuildpath/Dockerfile': '/'
112110
push:
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
steps:
2+
my-services-step:
3+
run:
4+
image: rockylinux:8.5
5+
volumes_from:
6+
- stats1
7+
cmds:
8+
- timeout 20 sh -c 'while [ ! -e /results/stats1 ] || [ ! -e /results/stats2 ] || [ ! -e /results/stats3 ]; do sleep 5; done'
9+
services:
10+
stats1:
11+
build: tests/runservicecontainer
12+
cmd: until ping -c1 stats2 >/dev/null 2>&1 && ping -c1 stats3 >/dev/null 2>&1; do sleep 5; done && touch /results/stats1
13+
stats2:
14+
build: tests/runservicecontainer
15+
volumes_from:
16+
- stats1
17+
cmd: until ping -c1 stats1 >/dev/null 2>&1 && ping -c1 stats3 >/dev/null 2>&1; do sleep 5; done && touch /results/stats2
18+
stats3:
19+
build: tests/runservicecontainer
20+
volumes_from:
21+
- stats1
22+
cmd: until ping -c1 stats1 >/dev/null 2>&1 && ping -c1 stats2 >/dev/null 2>&1; do sleep 5; done && touch /results/stats3

0 commit comments

Comments
 (0)