mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-11 16:17:39 +02:00
integration: remove tests (#2514)
This commit is contained in:
parent
c7bf038f41
commit
9aad155e1a
28 changed files with 0 additions and 2837 deletions
|
@ -1,24 +1,12 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"flag"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/onsi/gocleanup"
|
||||
"github.com/rs/zerolog"
|
||||
"github.com/rs/zerolog/log"
|
||||
|
||||
"github.com/pomerium/pomerium/integration/internal/cluster"
|
||||
)
|
||||
|
||||
var (
|
||||
mainCtx context.Context
|
||||
testcluster *cluster.Cluster
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
|
@ -31,26 +19,6 @@ func TestMain(m *testing.M) {
|
|||
log.Logger = log.Logger.Level(zerolog.InfoLevel)
|
||||
}
|
||||
|
||||
mainCtx = context.Background()
|
||||
var cancel func()
|
||||
mainCtx, cancel = context.WithCancel(mainCtx)
|
||||
var clearTimeout func()
|
||||
mainCtx, clearTimeout = context.WithTimeout(mainCtx, time.Minute*10)
|
||||
defer clearTimeout()
|
||||
|
||||
testcluster = cluster.New(getBaseDir())
|
||||
if err := testcluster.Setup(mainCtx); err != nil {
|
||||
log.Fatal().Err(err).Send()
|
||||
}
|
||||
|
||||
status := m.Run()
|
||||
cancel()
|
||||
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