-
-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* log level invalid cover * fixes log level wip * added validation for parser * logger level fixes * update logger * checkpoint * checkpoint wip * final logger improvements --------- Co-authored-by: Andriy Knysh <[email protected]>
- Loading branch information
1 parent
6bd89f1
commit 0a75010
Showing
6 changed files
with
143 additions
and
27 deletions.
There are no files selected for viewing
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
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 @@ | ||
logs: | ||
level: XTrace | ||
file: /dev/stdout | ||
|
||
stacks: | ||
base_path: stacks | ||
included_paths: | ||
- "**/*" |
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 @@ | ||
logs: | ||
level: Trace | ||
file: /dev/stdout | ||
|
||
stacks: | ||
base_path: stacks | ||
included_paths: | ||
- "**/*" |
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,80 @@ | ||
tests: | ||
- name: "Invalid Log Level in Config File" | ||
enabled: true | ||
description: "Test validation of invalid log level in atmos.yaml config file" | ||
workdir: "fixtures/invalid-log-level" | ||
command: "atmos" | ||
args: | ||
- terraform | ||
- plan | ||
- test | ||
- -s | ||
- test | ||
expect: | ||
exit_code: 1 | ||
stderr: | ||
- "Error: Invalid log level 'XTrace'. Valid options are: \\[Trace Debug Info Warning Off\\]" | ||
|
||
- name: "Invalid Log Level in Environment Variable" | ||
enabled: true | ||
description: "Test validation of invalid log level in ATMOS_LOGS_LEVEL env var" | ||
workdir: "../" | ||
command: "atmos" | ||
args: | ||
- terraform | ||
- plan | ||
- test | ||
- -s | ||
- test | ||
env: | ||
ATMOS_LOGS_LEVEL: XTrace | ||
expect: | ||
exit_code: 1 | ||
stderr: | ||
- "Error: Invalid log level 'XTrace'. Valid options are: \\[Trace Debug Info Warning Off\\]" | ||
|
||
- name: "Valid Log Level in Config File" | ||
enabled: true | ||
description: "Test validation of valid log level in atmos.yaml config file" | ||
workdir: "fixtures/valid-log-level" | ||
command: "atmos" | ||
args: | ||
- terraform | ||
- plan | ||
- test | ||
- -s | ||
- test | ||
expect: | ||
exit_code: 0 | ||
|
||
- name: "Valid Log Level in Environment Variable" | ||
enabled: true | ||
description: "Test validation of valid log level in ATMOS_LOGS_LEVEL env var" | ||
workdir: "../" | ||
command: "atmos" | ||
args: | ||
- terraform | ||
- plan | ||
- test | ||
- -s | ||
- test | ||
env: | ||
ATMOS_LOGS_LEVEL: Debug | ||
expect: | ||
exit_code: 0 | ||
|
||
- name: "Valid Log Level in Command Line Flag" | ||
enabled: true | ||
description: "Test validation of valid log level in --logs-level flag" | ||
workdir: "../" | ||
command: "atmos" | ||
args: | ||
- --logs-level | ||
- Info | ||
- terraform | ||
- plan | ||
- test | ||
- -s | ||
- test | ||
expect: | ||
exit_code: 0 |