From b1db1b9c673ac4bc6e3d7fc64b7fb11f6ec187ca Mon Sep 17 00:00:00 2001 From: Dave Clendenan Date: Wed, 2 Aug 2017 17:28:13 -0700 Subject: [PATCH] regex assertion rather than literal, for github path --- logrus_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/logrus_test.go b/logrus_test.go index 66c863d..3fc68c9 100644 --- a/logrus_test.go +++ b/logrus_test.go @@ -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) {