Skip to content

Commit

Permalink
Remove default values for sources
Browse files Browse the repository at this point in the history
This is done so Casper can work without sources.
  • Loading branch information
VMitov committed Oct 20, 2017
1 parent ed9964d commit 24b4cf8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/casper/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func newApp() *cli.App {
newSourcesSliceFlag(&cli.StringSliceFlag{
Name: "sources", Aliases: []string{"s"},
Usage: "[key=value, file://file.yaml]",
Value: cli.NewStringSlice("file://source.yaml"),
Value: cli.NewStringSlice(),
EnvVars: []string{"CASPER_SOURCES"},
}),
}
Expand Down
4 changes: 4 additions & 0 deletions cmd/casper/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ func TestExample(t *testing.T) {
// without config file
{cmd: "casper build -t ../../example/template.yaml -s placeholder1=val1 -s placeholder2=val2", out: outputFile},

// without sources
{cmd: "casper build -t ../../example/output.yaml", out: outputFile},
{cmd: "casper diff -t ../../example/output.yaml -storage file -file-path ../../example/output.yaml", out: noChanges},

// with overwritten placeholders so it there are differences
{cmd: "casper diff -s placeholder1=val1a -s placeholder2=val2a --plain", out: changes, pwd: "../../example"},
{cmd: "casper push -s placeholder1=val1a -s placeholder2=val2a --plain --force", out: changes + applyingChanges, pwd: "../../example"},
Expand Down

0 comments on commit 24b4cf8

Please sign in to comment.