regex assertion rather than literal, for github path

This commit is contained in:
Dave Clendenan 2017-08-02 17:28:13 -07:00
parent 3cb9e18ef9
commit b1db1b9c67
1 changed files with 2 additions and 2 deletions

View File

@ -113,7 +113,7 @@ func TestReportCallerHelperDirect(t *testing.T) {
assert.Equal(t, "direct", fields["msg"])
assert.Equal(t, "info", fields["level"])
assert.Equal(t, "github.com/dclendenan/logrus.logSomething", fields["func"])
assert.Regexp(t, "github.com/.*/logrus.logSomething", fields["func"])
}
// TestReportCallerHelperDirect - verify reference when logging from a function called via pointer
@ -123,7 +123,7 @@ func TestReportCallerHelperViaPointer(t *testing.T) {
assert.Equal(t, "via pointer", fields["msg"])
assert.Equal(t, "info", fields["level"])
assert.Equal(t, "github.com/dclendenan/logrus.logSomething", fields["func"])
assert.Regexp(t, "github.com/.*/logrus.logSomething", fields["func"])
}
func TestPrint(t *testing.T) {