-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(config): add import command (#2995)
- Loading branch information
Showing
5 changed files
with
195 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
cmd/scw/testdata/test-all-usage-config-import-usage.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
π²π²π² EXIT CODE: 0 π²π²π² | ||
π₯π₯π₯ STDERRοΈοΈ π₯π₯π₯οΈ | ||
Import configurations from another file | ||
|
||
USAGE: | ||
scw config import <file ...> [arg=value ...] | ||
|
||
ARGS: | ||
file Path to the configuration file to import | ||
|
||
FLAGS: | ||
-h, --help help for import | ||
|
||
GLOBAL FLAGS: | ||
-c, --config string The path to the config file | ||
-D, --debug Enable debug mode | ||
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human") | ||
-p, --profile string The config profile to use |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
internal/namespaces/config/testdata/test-config-import-command-simple.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
π²π²π² EXIT CODE: 0 π²π²π² | ||
π©π©π© STDOUTοΈ π©π©π©οΈ | ||
β Successfully import config. | ||
π©π©π© JSON STDOUT π©π©π© | ||
{ | ||
"message": "successfully import config", | ||
"details": "" | ||
} |