Remove redundant unit test in pkg/util/log

The hardcoded GoPath introduced a hard dependency on our local file
path. Since we enabled go mod in 4.5, we shouldn't be required to couple
ourselves to gopath anymore.

Signed-off-by: Ivan Sim <isim@redhat.com>
This commit is contained in:
Ivan Sim 2020-11-13 10:03:29 -08:00
Родитель 754020de13
Коммит 2bcbcb8fa0
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 40C65865B11F1502
1 изменённых файлов: 1 добавлений и 12 удалений

Просмотреть файл

@ -6,7 +6,6 @@ package log
import (
"reflect"
"runtime"
"strings"
"testing"
"github.com/sirupsen/logrus"
@ -76,7 +75,7 @@ func TestRelativeFilePathPrettier(t *testing.T) {
currentFrames := runtime.CallersFrames(pc)
currentFunc, _ := currentFrames.Next()
currentFunc.Line = 11 // so it's not too fragile
goPath := strings.Split(currentFunc.File, "src/github.com")[0]
tests := []struct {
name string
f *runtime.Frame
@ -95,16 +94,6 @@ func TestRelativeFilePathPrettier(t *testing.T) {
wantFunction: "()",
wantFile: ":0",
},
{
name: "install",
f: &runtime.Frame{
Function: "github.com/Azure/ARO-RP/pkg/install/install.deployResourceTemplate",
File: goPath + "src/github.com/Azure/ARO-RP/pkg/install/1-installresources.go",
Line: 623,
},
wantFunction: "install.deployResourceTemplate()",
wantFile: "pkg/install/1-installresources.go:623",
},
}
for _, tt := range tests {