From 9960482a2552b32b9fa373dd463b4dedeb79b5b4 Mon Sep 17 00:00:00 2001 From: Friedrich Wilken Date: Sat, 9 Dec 2023 10:55:02 +0100 Subject: [PATCH] Revert some signature changes. --- e2e/setup/setup_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/e2e/setup/setup_test.go b/e2e/setup/setup_test.go index e7b9658c..f0f7d187 100644 --- a/e2e/setup/setup_test.go +++ b/e2e/setup/setup_test.go @@ -116,7 +116,7 @@ func Test_CR(t *testing.T) { // Get the NATS CR from the cluster. actual, err := RetryGet(attempts, interval, func() (*natsv1alpha1.NATS, error) { - return getNATSCR(want.Name, want.Namespace) + return getNATSCR(context.TODO(), want.Name, want.Namespace) }) require.NoError(t, err) @@ -246,7 +246,7 @@ func Test_PodsReady(t *testing.T) { // RetryGet the NATS CR. It will tell us how many Pods we should expect. natsCR, err := RetryGet(attempts, interval, func() (*natsv1alpha1.NATS, error) { - return getNATSCR(CRName, NamespaceName) + return getNATSCR(context.TODO(), CRName, NamespaceName) }) require.NoError(t, err) @@ -342,9 +342,9 @@ func Test_Secret(t *testing.T) { require.NoError(t, err) } -func getNATSCR(name, namespace string) (*natsv1alpha1.NATS, error) { +func getNATSCR(ctx context.Context, name, namespace string) (*natsv1alpha1.NATS, error) { var natsCR natsv1alpha1.NATS - err := k8sClient.Get(context.TODO(), k8stypes.NamespacedName{ + err := k8sClient.Get(ctx, k8stypes.NamespacedName{ Name: name, Namespace: namespace, }, &natsCR) @@ -395,7 +395,7 @@ func waitForNATSCRReady() error { // Get the NATS CR from the cluster. gotNATSCR, err := RetryGet(attempts, interval, func() (*natsv1alpha1.NATS, error) { - return getNATSCR(want.Name, want.Namespace) + return getNATSCR(context.TODO(), want.Name, want.Namespace) }) if err != nil { return err