Add options to configure logging
This commit is contained in:
35
spec/configureLogging_spec.sh
Normal file
35
spec/configureLogging_spec.sh
Normal 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
|
||||
Reference in New Issue
Block a user