Skip to content

Commit 9cf8620

Browse files
committed
add test
1 parent 88b735b commit 9cf8620

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

cli_test.go

+20-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,26 @@ var cliTests = []struct {
131131
OptionFilePath: "override.jsonnet",
132132
Color: true,
133133
Envfile: []string{},
134-
LogLevel: "trace", // priority is higher than env
134+
LogLevel: "trace", // option file's priority is higher than env
135+
Profile: ptr("mine"),
136+
Region: ptr("us-west-2"),
137+
},
138+
},
139+
{
140+
args: []string{"render",
141+
"--profile", "mine",
142+
"--region", "us-west-2",
143+
},
144+
env: map[string]string{
145+
"LAMBROLL_OPTION": "override.jsonnet",
146+
"LAMBROLL_LOG_LEVEL": "debug",
147+
},
148+
sub: "render",
149+
option: &lambroll.Option{
150+
OptionFilePath: "override.jsonnet",
151+
Color: true,
152+
Envfile: []string{},
153+
LogLevel: "trace", // option file's priority is higher than env
135154
Profile: ptr("mine"),
136155
Region: ptr("us-west-2"),
137156
},

0 commit comments

Comments
 (0)