@@ -23,6 +23,7 @@ ${yml} version: "2"\nservices:\n${SPACE}web:\n${SPACE}${SPACE}image: python:2.7
23
23
${link-yml } version: "2"\nservices:\n${SPACE } redis1:\n${SPACE }${SPACE } image: redis:alpine\n${SPACE }${SPACE } container_name: redis1\n${SPACE }${SPACE } ports: ["6379"]\n${SPACE } web1:\n${SPACE }${SPACE } image: busybox\n${SPACE }${SPACE } container_name: a.b.c\n${SPACE }${SPACE } links:\n${SPACE }${SPACE } - redis1:aaa\n${SPACE }${SPACE } command: ["ping", "aaa"]
24
24
${rename-yml-1 } version: "2"\nservices:\n${SPACE } web:\n${SPACE }${SPACE } image: busybox\n${SPACE }${SPACE } command: ["/bin/top"]
25
25
${rename-yml-2 } version: "2"\nservices:\n${SPACE } web:\n${SPACE }${SPACE } image: ubuntu\n${SPACE }${SPACE } command: ["date"]
26
+ ${hello-yml } version: "2"\nservices:\n${SPACE } top:\n${SPACE }${SPACE } image: busybox\n${SPACE }${SPACE } container_name: top\n${SPACE }${SPACE } command: ["echo", "hello, world"]
26
27
27
28
*** Keywords ***
28
29
Check Compose Logs
@@ -72,13 +73,19 @@ Compose Up while another container is running (ps filtering related)
72
73
${rc } ${out } = Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS } -f basic-compose.yml up -d
73
74
Log ${out }
74
75
Should Be Equal As Integers ${rc } 0
76
+ ${rc } ${output } = Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS } --file basic-compose.yml down
77
+ Log ${output }
78
+ Should Be Equal As Integers ${rc } 0
75
79
76
80
Compose Up with link
77
81
Run echo '${link-yml } ' > link-compose.yml
78
82
${rc } ${output } = Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS } --file link-compose.yml up -d
79
83
Log ${output }
80
84
Should Be Equal As Integers ${rc } 0
81
85
Wait Until Keyword Succeeds 10x 10s Check Compose Logs
86
+ ${rc } ${output } = Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS } --file link-compose.yml down
87
+ Log ${output }
88
+ Should Be Equal As Integers ${rc } 0
82
89
83
90
Compose bundle creation
84
91
${rc } Run And Return Rc docker-compose %{COMPOSE-PARAMS } --file basic-compose.yml pull
@@ -87,6 +94,9 @@ Compose bundle creation
87
94
Log ${output }
88
95
Should Contain ${output } Wrote bundle
89
96
Should Be Equal As Integers ${rc } 0
97
+ ${rc } ${output } = Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS } --file basic-compose.yml down
98
+ Log ${output }
99
+ Should Be Equal As Integers ${rc } 0
90
100
91
101
Compose up -d --force-recreate
92
102
Run echo '${rename-yml-1 } ' > compose-rename.yml
@@ -99,6 +109,24 @@ Compose up -d --force-recreate
99
109
100
110
Compose up -d with a new image
101
111
Run echo '${rename-yml-2 } ' > compose-rename.yml
102
- ${rc } ${output } = Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS } --file compose-rename.yml up -d
112
+ ${rc } ${output } = Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS } --file compose-rename.yml up -d
113
+ Log ${output }
114
+ Should Be Equal As Integers ${rc } 0
115
+ ${rc } ${output } = Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS } --file compose-rename.yml down
116
+ Log ${output }
117
+ Should Be Equal As Integers ${rc } 0
118
+
119
+ Compose up in foreground (attach path)
120
+ Run echo '${hello-yml } ' > hello-compose.yml
121
+ ${rc } ${output } = Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS } -f hello-compose.yml pull
122
+ Should Be Equal As Integers ${rc } 0
123
+ Log ${output }
124
+
125
+ # Bring up the compose app and wait till they're up and running
126
+ ${rc } ${output } = Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS } -f hello-compose.yml up
127
+ Log ${output }
128
+ Should Contain ${output } hello, world
129
+
130
+ ${rc } ${output } = Run And Return Rc And Output docker-compose %{COMPOSE-PARAMS } -f hello-compose.yml down
103
131
Log ${output }
104
132
Should Be Equal As Integers ${rc } 0
0 commit comments