mirror of
https://github.com/zrepl/zrepl.git
synced 2024-12-03 05:45:27 +01:00
17 lines
322 B
Go
17 lines
322 B
Go
|
package trace
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
)
|
||
|
|
||
|
func TestGetCallerOrPanic(t *testing.T) {
|
||
|
withStackFromCtxMock := func() string {
|
||
|
return getMyCallerOrPanic()
|
||
|
}
|
||
|
ret := withStackFromCtxMock()
|
||
|
// zrepl prefix is stripped
|
||
|
assert.Equal(t, "daemon/logging/trace.TestGetCallerOrPanic", ret)
|
||
|
}
|