Skip to content

Commit a711841

Browse files
committed
config: test env_merge append in modules
Signed-off-by: Jiwoo Ahn <ikwydls1314@gmail.com>
1 parent 90d3090 commit a711841

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

common/pkg/config/modules_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ var _ = Describe("Config Modules", func() {
5757
gomega.Expect(err).ToNot(gomega.HaveOccurred())
5858
gomega.Expect(c.Containers.InitPath).To(gomega.Equal("etc four"))
5959
gomega.Expect(c.Containers.Env.Get()).To(gomega.Equal([]string{"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "usr share only"}))
60+
gomega.Expect(c.Containers.EnvMerge.Get()).To(gomega.Equal([]string{
61+
"PATH=/base/bin:${PATH}",
62+
"PATH=/usr/local/share/bin:${PATH}",
63+
"etc only env_merge conf",
64+
}))
6065
gomega.Expect(c.Network.DefaultNetwork).To(gomega.Equal("etc only conf"))
6166
gomega.Expect(c.LoadedModules()).To(gomega.HaveLen(3)) // 3 modules are getting loaded!
6267

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
[network]
22
default_network="etc only conf"
3+
4+
[containers]
5+
env_merge=["PATH=/usr/local/share/bin:${PATH}", "etc only env_merge conf", {append=true}]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[containers]
22
env=["usr share only", {append=true}]
3+
env_merge=["PATH=/base/bin:${PATH}"]

0 commit comments

Comments
 (0)