Skip to content

Commit 52fb3cd

Browse files
committed
fixup! Add test cases for implicit container contribution feature
1 parent 066a9af commit 52fb3cd

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: "Opt in for second component"
2+
3+
input:
4+
devworkspace:
5+
components:
6+
- name: test-component
7+
container:
8+
image: test-image
9+
env:
10+
- name: TEST_ENVVAR
11+
value: TEST_VALUE
12+
- name: test-component-opt-in
13+
attributes:
14+
controller.devfile.io/merge-contribution: true
15+
container:
16+
image: test-image
17+
env:
18+
- name: TEST_ENVVAR
19+
value: TEST_VALUE
20+
21+
- name: test-contribution
22+
plugin:
23+
uri: test-contribution.yaml
24+
25+
devfileResources:
26+
test-contribution.yaml:
27+
schemaVersion: 2.1.0
28+
metadata:
29+
name: test-contribution
30+
components:
31+
- name: test-contribution
32+
attributes:
33+
controller.devfile.io/container-contribution: true
34+
container:
35+
image: contribution-image
36+
env:
37+
- name: CONTRIB_ENVVAR
38+
value: CONTRIB_VALUE
39+
- name: unmerged-container
40+
container:
41+
image: unmerged-container
42+
- name: unmerged-volume
43+
volume: {}
44+
commands:
45+
- name: plugin-command
46+
apply:
47+
component: unmerged-container
48+
events:
49+
prestart:
50+
- plugin-command
51+
52+
output:
53+
devworkspace:
54+
components:
55+
- name: test-component
56+
container:
57+
image: test-image
58+
env:
59+
- name: TEST_ENVVAR
60+
value: TEST_VALUE
61+
- name: test-component-opt-in
62+
attributes:
63+
controller.devfile.io/merged-contributions: "test-contribution"
64+
container:
65+
image: test-image
66+
env:
67+
- name: TEST_ENVVAR
68+
value: TEST_VALUE
69+
- name: CONTRIB_ENVVAR
70+
value: CONTRIB_VALUE
71+
- name: unmerged-container
72+
attributes:
73+
controller.devfile.io/imported-by: test-contribution
74+
container:
75+
image: unmerged-container
76+
- name: unmerged-volume
77+
attributes:
78+
controller.devfile.io/imported-by: test-contribution
79+
volume: {}
80+
commands:
81+
- name: plugin-command
82+
attributes:
83+
controller.devfile.io/imported-by: test-contribution
84+
apply:
85+
component: unmerged-container
86+
events:
87+
prestart:
88+
- plugin-command

0 commit comments

Comments
 (0)