Skip to content

Commit

Permalink
Differentiate test failure messages
Browse files Browse the repository at this point in the history
Signed-off-by: albertteoh <albert.teoh@logz.io>
  • Loading branch information
albertteoh committed Nov 30, 2020
1 parent 719c74b commit 58bfc88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/config/tlscfg/cert_watcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func TestReload(t *testing.T) {
assert.True(t, logObserver.
FilterMessage("Failed to load certificate").
FilterField(zap.String("certificate", certFile.Name())).Len() > 0,
"Failed to find wanted logs. All logs: "+fmt.Sprint(logObserver.All()))
"Unable to locate 'Failed to load certificate' error in log. All logs: "+fmt.Sprint(logObserver.All()))

// Write the client's private key.
keyData, err = ioutil.ReadFile(clientKey)
Expand All @@ -115,7 +115,7 @@ func TestReload(t *testing.T) {
assert.True(t, logObserver.
FilterMessage("Loaded modified certificate").
FilterField(zap.String("certificate", keyFile.Name())).Len() > 0,
"Failed to find wanted logs. All logs: "+fmt.Sprint(logObserver.All()))
"Unable to locate 'Loaded modified certificate' error in log. All logs: "+fmt.Sprint(logObserver.All()))

cert, err = tls.LoadX509KeyPair(filepath.Clean(clientCert), clientKey)
require.NoError(t, err)
Expand Down

0 comments on commit 58bfc88

Please sign in to comment.