Skip to content

Commit

Permalink
#142 Fix bats tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jelemux committed Jun 10, 2024
1 parent 3450ad2 commit 11e3c3f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions batsTests/logging.bats
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,8 @@ teardown() {
run renderLoggingProperties

assert_failure
assert_equal "$(mock_get_call_num "${doguctl}")" "2"
assert_equal "$(mock_get_call_num "${doguctl}")" "1"
assert_equal "$(mock_get_call_args "${doguctl}" "1")" "template /opt/apache-tomcat/conf/logging.properties.tpl /opt/apache-tomcat/conf/logging.properties"
assert_equal "$(mock_get_call_args "${doguctl}" "2")" "state LoggingTemplateError"
assert_line "Could not template log /opt/apache-tomcat/conf/logging.properties.tpl to path /opt/apache-tomcat/conf/logging.properties: exited with 1"
}
@test "renderLogbackXml() should fail on template error" {
Expand All @@ -155,8 +154,7 @@ teardown() {
run renderLogbackXml

assert_failure
assert_equal "$(mock_get_call_num "${doguctl}")" "2"
assert_equal "$(mock_get_call_num "${doguctl}")" "1"
assert_equal "$(mock_get_call_args "${doguctl}" "1")" "template /opt/apache-tomcat/conf/logback.xml.tpl /opt/apache-tomcat/webapps/usermgt/WEB-INF/classes/logback.xml"
assert_equal "$(mock_get_call_args "${doguctl}" "2")" "state LoggingTemplateError"
assert_line "Could not template log /opt/apache-tomcat/conf/logback.xml.tpl to path /opt/apache-tomcat/webapps/usermgt/WEB-INF/classes/logback.xml: exited with 1"
}

0 comments on commit 11e3c3f

Please sign in to comment.