Skip to content

Commit 463fd91

Browse files
Add tests for new environment variables in CLI
Adding tests for Submodules and two missing
1 parent 5407a5b commit 463fd91

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

options/options_test.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,25 @@ func TestEnvOptionParsing(t *testing.T) {
7272
require.False(t, o.GitCloneSingleBranch)
7373
require.True(t, o.GitCloneThinPack)
7474
})
75+
76+
t.Run("remote repo build mode", func(t *testing.T) {
77+
t.Setenv(options.WithEnvPrefix("REMOTE_REPO_BUILD_MODE"), "true")
78+
o := runCLI()
79+
require.True(t, o.RemoteRepoBuildMode)
80+
})
81+
82+
t.Run("binary path", func(t *testing.T) {
83+
const val = "/usr/local/bin/envbuilder"
84+
t.Setenv(options.WithEnvPrefix("BINARY_PATH"), val)
85+
o := runCLI()
86+
require.Equal(t, o.BinaryPath, val)
87+
})
88+
89+
t.Run("git clone submodules", func(t *testing.T) {
90+
t.Setenv(options.WithEnvPrefix("GIT_CLONE_SUBMODULES"), "true")
91+
o := runCLI()
92+
require.True(t, o.GitCloneSubmodules)
93+
})
7594
})
7695
}
7796

0 commit comments

Comments
 (0)