Add options to configure logging

This commit is contained in:
Rezart Qelibari
2022-02-12 19:57:36 +01:00
parent 4eb51e34a7
commit 216cd329c0
2 changed files with 45 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
Describe 'configureLogging'
Include ./install.sh
args=()
lop() { args=("$@") }
setup() { args=() }
BeforeEach setup
It 'configures lop with standard args'
When call configureLogging
The variable 'args[3]' should eq 'info'
The variable 'args[4]' should eq 'tostdout'
End
It 'configures lop output mode'
logfile="/some/path with spaces/to/file.txt"
When call configureLogging
The variable 'args[3]' should eq 'info'
The variable 'args[4]' should eq "${logfile}"
End
It 'configures lop log level'
verbose=true
When call configureLogging
The variable 'args[3]' should eq 'debug'
The variable 'args[4]' should eq 'tostdout'
End
It 'configures lop output mode and log level'
logfile="/some/path with spaces/to/file.txt"
verbose=true
When call configureLogging
The variable 'args[3]' should eq 'debug'
The variable 'args[4]' should eq "${logfile}"
End
End