tests: Move MustAbsPath function to testutils

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
This commit is contained in:
Marek Siarkowicz
2022-10-17 12:16:06 +02:00
parent bf6a1d7264
commit 07ca384753
8 changed files with 62 additions and 42 deletions

View File

@ -16,7 +16,6 @@ package integration
import (
"os"
"path/filepath"
"testing"
grpc_logsettable "github.com/grpc-ecosystem/go-grpc-middleware/logging/settable"
@ -113,14 +112,6 @@ func assertInTestContext(t testutil.TB) {
}
}
func MustAbsPath(path string) string {
abs, err := filepath.Abs(path)
if err != nil {
panic(err)
}
return abs
}
func NewEmbedConfig(t testing.TB, name string) *embed.Config {
cfg := embed.NewConfig()
cfg.Name = name