Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 75db77c

Browse files
committed
e2e test for helm command with v1beta1 stack version option
Signed-off-by: Joffrey F <joffrey@docker.com>
1 parent 2618559 commit 75db77c

2 files changed

Lines changed: 86 additions & 0 deletions

File tree

e2e/binary_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,17 @@ func TestHelmBinary(t *testing.T) {
286286
golden.Assert(t, string(stack), "helm-expected.chart/templates/stack.yaml")
287287
}
288288

289+
func TestHelmV1Beta1Binary(t *testing.T) {
290+
dockerApp, _ := getBinary(t)
291+
assertCommand(t, dockerApp, "helm", "helm", "-s", "myapp.nginx_version=2", "--stack-version", "v1beta1")
292+
chart, _ := ioutil.ReadFile("helm.chart/Chart.yaml")
293+
values, _ := ioutil.ReadFile("helm.chart/values.yaml")
294+
stack, _ := ioutil.ReadFile("helm.chart/templates/stack.yaml")
295+
golden.Assert(t, string(chart), "helm-expected.chart/Chart.yaml")
296+
golden.Assert(t, string(values), "helm-expected.chart/values.yaml")
297+
golden.Assert(t, string(stack), "helm-expected.chart/templates/stack-v1beta1.yaml")
298+
}
299+
289300
func TestSplitMergeBinary(t *testing.T) {
290301
dockerApp, hasExperimental := getBinary(t)
291302
if !hasExperimental {
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
objectmeta:
2+
annotations: {}
3+
clustername: ""
4+
creationtimestamp: "0001-01-01T00:00:00Z"
5+
deletiongraceperiodseconds: null
6+
deletiontimestamp: null
7+
finalizers: []
8+
generatename: ""
9+
generation: 0
10+
initializers: null
11+
labels: {}
12+
name: helm
13+
namespace: default
14+
ownerreferences: []
15+
resourceversion: ""
16+
selflink: ""
17+
uid: ""
18+
spec:
19+
composefile: |
20+
version: "3.4"
21+
services:
22+
app-watcher:
23+
image: {{.Values.watcher.image}}
24+
debug:
25+
deploy:
26+
resources:
27+
limits:
28+
memory:
29+
valuetemplate: {{.Values.memory}}
30+
healthcheck:
31+
test:
32+
- /ping
33+
- debug
34+
timeout:
35+
valuetemplate: {{.Values.timeout}}
36+
interval:
37+
value: 2m0s
38+
image: busybox:latest
39+
ports:
40+
- mode: ingress
41+
target:
42+
valuetemplate: {{.Values.aport}}
43+
protocol: tcp
44+
- mode: ingress
45+
target:
46+
valuetemplate: {{.Values.sport}}
47+
published:
48+
valuetemplate: {{.Values.dport}}
49+
protocol: tcp
50+
template_privileged:
51+
valuetemplate: {{.Values.privileged}}
52+
read_only:
53+
valuetemplate: {{.Values.read_only}}
54+
stdin_open:
55+
valuetemplate: {{.Values.stdin_open}}
56+
tty:
57+
valuetemplate: {{.Values.tty}}
58+
front:
59+
deploy:
60+
replicas:
61+
valuetemplate: {{.Values.myapp.nginx_replicas}}
62+
image: nginx:{{.Values.myapp.nginx_version}}
63+
monitor:
64+
command:
65+
- monitor
66+
- --source
67+
- {{.Values.app.name}}-{{.Values.app.version}}
68+
- $dollar
69+
image: busybox:latest
70+
status:
71+
message: ""
72+
phase: ""
73+
typemeta:
74+
apiversion: v1beta1
75+
kind: stacks.compose.docker.com

0 commit comments

Comments
 (0)