mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-17 11:07:18 +02:00
inegration: fix linting issues
This commit is contained in:
parent
cb3e78cd01
commit
b11a336a33
8 changed files with 21 additions and 12 deletions
|
@ -15,8 +15,6 @@ import (
|
|||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
const localHTTPSPort = 9443
|
||||
|
||||
var (
|
||||
mainCtx context.Context
|
||||
testcluster *cluster.Cluster
|
||||
|
@ -39,8 +37,7 @@ func TestMain(m *testing.M) {
|
|||
mainCtx, clearTimeout = context.WithTimeout(mainCtx, time.Minute*10)
|
||||
defer clearTimeout()
|
||||
|
||||
_, mainTestFilePath, _, _ := runtime.Caller(0)
|
||||
testcluster = cluster.New(filepath.Dir(mainTestFilePath))
|
||||
testcluster = cluster.New(getBaseDir())
|
||||
if err := testcluster.Setup(mainCtx); err != nil {
|
||||
log.Fatal().Err(err).Send()
|
||||
}
|
||||
|
@ -50,3 +47,9 @@ func TestMain(m *testing.M) {
|
|||
gocleanup.Cleanup()
|
||||
os.Exit(status)
|
||||
}
|
||||
|
||||
// getBaseDir returns the directory that main_test resides in
|
||||
func getBaseDir() string {
|
||||
_, file, _, _ := runtime.Caller(0) //nolint
|
||||
return filepath.Dir(file)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue