Skip to content

Commit 40648dd

Browse files
committed
fix: recreate golden testdata
Signed-off-by: Matthew Clarke <[email protected]>
1 parent 8114806 commit 40648dd

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

pkg/test/testreconciler/simpletest/controller.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package simpletest
1818

1919
import (
2020
"context"
21+
"fmt"
2122
"time"
2223

2324
"github.com/go-logr/logr"
@@ -44,6 +45,7 @@ type SimpleTestReconciler struct {
4445
client.Client
4546
Log logr.Logger
4647
Scheme *runtime.Scheme
48+
TestSuffix string
4749

4850
watchLabels declarative.LabelMaker
4951

@@ -89,7 +91,7 @@ func (r *SimpleTestReconciler) SetupWithManager(mgr ctrl.Manager) error {
8991
return err
9092
}
9193

92-
c, err := controller.New("simpletest-controller", mgr, controller.Options{Reconciler: r})
94+
c, err := controller.New(fmt.Sprintf("simpletest-controller-%s", r.TestSuffix), mgr, controller.Options{Reconciler: r})
9395
if err != nil {
9496
return err
9597
}

pkg/test/testreconciler/simpletest/controller_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ func testSimpleReconciler(h *testharness.Harness, testdir string, applier applie
8787
}
8888

8989
reconciler := &SimpleTestReconciler{
90+
TestSuffix: testdir,
9091
Client: mgr.GetClient(),
9192
Scheme: mgr.GetScheme(),
9293
applier: applier,

pkg/test/testreconciler/simpletest/testdata/reconcile/ssa/create/expected-http.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ Date: (removed)
245245
---
246246

247247
GET http://kube-apiserver/api
248-
Accept: application/json;g=apidiscovery.k8s.io;v=v2beta1;as=APIGroupDiscoveryList,application/json
248+
Accept: application/json;g=apidiscovery.k8s.io;v=v2;as=APIGroupDiscoveryList,application/json;g=apidiscovery.k8s.io;v=v2beta1;as=APIGroupDiscoveryList,application/json
249249

250250

251251
200 OK
@@ -259,7 +259,7 @@ Date: (removed)
259259
---
260260

261261
GET http://kube-apiserver/apis
262-
Accept: application/json;g=apidiscovery.k8s.io;v=v2beta1;as=APIGroupDiscoveryList,application/json
262+
Accept: application/json;g=apidiscovery.k8s.io;v=v2;as=APIGroupDiscoveryList,application/json;g=apidiscovery.k8s.io;v=v2beta1;as=APIGroupDiscoveryList,application/json
263263

264264

265265
200 OK

0 commit comments

Comments
 (0)