Skip to content

Commit

Permalink
Test disabling the monitor to see if watch errors dissappear
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis committed Mar 22, 2024
1 parent 43a9ba0 commit 968f449
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 3 additions & 1 deletion test/pkg/environment/common/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ import (
controllerruntime "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/client"

coreapis "sigs.k8s.io/karpenter/pkg/apis"
corev1beta1 "sigs.k8s.io/karpenter/pkg/apis/v1beta1"
"sigs.k8s.io/karpenter/pkg/operator"
operatorlogging "sigs.k8s.io/karpenter/pkg/operator/logging"
coretest "sigs.k8s.io/karpenter/pkg/test"

"github.com/aws/karpenter-provider-aws/pkg/apis"
Expand Down Expand Up @@ -70,6 +70,8 @@ func NewEnvironment(t *testing.T) *Environment {
config := NewConfig()
client := NewClient(ctx, config)

operatorlogging.ConfigureGlobalLoggers(ctx)

lo.Must0(os.Setenv(system.NamespaceEnvKey, "kube-system"))
if val, ok := os.LookupEnv("GIT_REF"); ok {
ctx = context.WithValue(ctx, GitRefContextKey, val)
Expand Down
8 changes: 2 additions & 6 deletions test/pkg/environment/common/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,10 @@ import (
"sigs.k8s.io/karpenter/pkg/test"
"sigs.k8s.io/karpenter/pkg/utils/pod"

"github.com/aws/karpenter-provider-aws/pkg/apis/v1beta1"
"github.com/aws/karpenter-provider-aws/test/pkg/debug"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/aws/karpenter-provider-aws/pkg/apis/v1beta1"
)

const TestingFinalizer = "testing/finalizer"
Expand All @@ -63,8 +62,6 @@ var (

// nolint:gocyclo
func (env *Environment) BeforeEach() {
debug.BeforeEach(env.Context, env.Config, env.Client)

// Expect this cluster to be clean for test runs to execute successfully
env.ExpectCleanCluster()

Expand Down Expand Up @@ -104,7 +101,6 @@ func (env *Environment) Cleanup() {
}

func (env *Environment) AfterEach() {
debug.AfterEach(env.Context)
env.printControllerLogs(&v1.PodLogOptions{Container: "controller"})
}

Expand Down

0 comments on commit 968f449

Please sign in to comment.