Skip to content

Commit b97046f

Browse files
committed
revert config changes
Signed-off-by: Karol Szwaj <[email protected]> On-behalf-of: @SAP [email protected]
1 parent 98ae1aa commit b97046f

File tree

5 files changed

+45
-25
lines changed

5 files changed

+45
-25
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,10 @@ verify-codegen: ## Verify codegen
235235
imports: WHAT ?=
236236
imports: $(GOLANGCI_LINT) verify-go-versions
237237
@if [ -n "$(WHAT)" ]; then \
238-
$(GOLANGCI_LINT) run --fix --fast-only $(WHAT); \
238+
$(GOLANGCI_LINT) run --fix --fast-only $(WHAT); \
239239
else \
240240
for MOD in . $$(git ls-files '**/go.mod' | sed 's,/go.mod,,'); do \
241-
(cd $$MOD; $(GOLANGCI_LINT) run --fix --fast-only); \
241+
(cd $$MOD; $(GOLANGCI_LINT) run --fix --fast-only); \
242242
done; \
243243
fi
244244

cli/pkg/workspace/plugin/create_test.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,13 @@ func TestCreate(t *testing.T) {
184184

185185
var got *clientcmdapi.Config
186186

187-
cluster := tt.config.Clusters[tt.config.Contexts[tt.config.CurrentContext].Cluster]
187+
cluster := tt.config.Clusters[tt.config.Contexts[tt.config.CurrentContext].Cluster] //nolint:govet // TODO(sttts): fixing this above breaks the test
188188
u := parseURLOrDie(cluster.Server)
189189
currentClusterName := logicalcluster.NewPath(strings.TrimPrefix(u.Path, "/clusters/"))
190190
u.Path = ""
191191

192192
objects := []runtime.Object{}
193-
for _, name := range tt.existingWorkspaces {
193+
for _, name := range tt.existingWorkspaces { //nolint:govet // TODO(sttts): fixing this above breaks the test
194194
objects = append(objects, &tenancyv1alpha1.Workspace{
195195
ObjectMeta: metav1.ObjectMeta{
196196
Name: name,
@@ -217,7 +217,7 @@ func TestCreate(t *testing.T) {
217217
}
218218
}
219219

220-
if tt.markReady {
220+
if tt.markReady { //nolint:govet // TODO(sttts): fixing this above breaks the test
221221
client.PrependReactor("create", "workspaces", func(action kcptesting.Action) (handled bool, ret runtime.Object, err error) {
222222
obj := action.(kcptesting.CreateAction).GetObject().(*tenancyv1alpha1.Workspace)
223223
obj.Status.Phase = corev1alpha1.LogicalClusterPhaseReady
@@ -233,30 +233,30 @@ func TestCreate(t *testing.T) {
233233
}
234234

235235
opts := NewCreateWorkspaceOptions(genericclioptions.NewTestIOStreamsDiscard())
236-
opts.Name = tt.newWorkspaceName
236+
opts.Name = tt.newWorkspaceName //nolint:govet // TODO(sttts): fixing this above breaks the test
237237
opts.Type = workspaceType.Path + ":" + string(workspaceType.Name)
238-
opts.IgnoreExisting = tt.ignoreExisting
239-
opts.EnterAfterCreate = tt.useAfterCreation
238+
opts.IgnoreExisting = tt.ignoreExisting //nolint:govet // TODO(sttts): fixing this above breaks the test
239+
opts.EnterAfterCreate = tt.useAfterCreation //nolint:govet // TODO(sttts): fixing this above breaks the test
240240
opts.ReadyWaitTimeout = time.Second
241241
opts.modifyConfig = func(configAccess clientcmd.ConfigAccess, config *clientcmdapi.Config) error {
242242
got = config
243243
return nil
244244
}
245245
opts.kcpClusterClient = client
246-
opts.ClientConfig = clientcmd.NewDefaultClientConfig(*tt.config.DeepCopy(), nil)
246+
opts.ClientConfig = clientcmd.NewDefaultClientConfig(*tt.config.DeepCopy(), nil) //nolint:govet // TODO(sttts): fixing this above breaks the test
247247
err := opts.Run(context.Background())
248-
if tt.wantErr {
248+
if tt.wantErr { //nolint:govet // TODO(sttts): fixing this above breaks the test
249249
require.Error(t, err)
250250
} else {
251251
require.NoError(t, err)
252252
}
253253

254-
if got != nil && tt.expected == nil {
254+
if got != nil && tt.expected == nil { //nolint:govet // TODO(sttts): fixing this above breaks the test
255255
t.Errorf("unexpected kubeconfig write")
256-
} else if got == nil && tt.expected != nil {
256+
} else if got == nil && tt.expected != nil { //nolint:govet // TODO(sttts): fixing this above breaks the test
257257
t.Errorf("expected a kubeconfig write, but didn't see one")
258-
} else if got != nil && !reflect.DeepEqual(got, tt.expected) {
259-
t.Errorf("unexpected config, diff (expected, got): %s", cmp.Diff(tt.expected, got))
258+
} else if got != nil && !reflect.DeepEqual(got, tt.expected) { //nolint:govet // TODO(sttts): fixing this above breaks the test
259+
t.Errorf("unexpected config, diff (expected, got): %s", cmp.Diff(tt.expected, got)) //nolint:govet // TODO(sttts): fixing this above breaks the test
260260
}
261261
})
262262
}
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
apiVersion: apis.kcp.io/v1alpha1
1+
apiVersion: apis.kcp.io/v1alpha2
22
kind: APIExport
33
metadata:
44
creationTimestamp: null
55
name: shards.core.kcp.io
66
spec:
7-
latestResourceSchemas:
8-
- v240903-d6797056a.shards.core.kcp.io
7+
resources:
8+
- group: core.kcp.io
9+
name: shards
10+
schema: v240903-d6797056a.shards.core.kcp.io
11+
storage:
12+
crd: {}
913
status: {}
Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1-
apiVersion: apis.kcp.io/v1alpha1
1+
apiVersion: apis.kcp.io/v1alpha2
22
kind: APIExport
33
metadata:
44
creationTimestamp: null
55
name: tenancy.kcp.io
66
spec:
7-
latestResourceSchemas:
8-
- v250325-c1864de17.workspacetypes.tenancy.kcp.io
9-
- v250421-25d98218b.workspaces.tenancy.kcp.io
107
maximalPermissionPolicy:
118
local: {}
9+
resources:
10+
- group: tenancy.kcp.io
11+
name: workspaces
12+
schema: v250421-25d98218b.workspaces.tenancy.kcp.io
13+
storage:
14+
crd: {}
15+
- group: tenancy.kcp.io
16+
name: workspacetypes
17+
schema: v250325-c1864de17.workspacetypes.tenancy.kcp.io
18+
storage:
19+
crd: {}
1220
status: {}
Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1-
apiVersion: apis.kcp.io/v1alpha1
1+
apiVersion: apis.kcp.io/v1alpha2
22
kind: APIExport
33
metadata:
44
creationTimestamp: null
55
name: topology.kcp.io
66
spec:
7-
latestResourceSchemas:
8-
- v240903-d6797056a.partitions.topology.kcp.io
9-
- v240903-d6797056a.partitionsets.topology.kcp.io
7+
resources:
8+
- group: topology.kcp.io
9+
name: partitions
10+
schema: v240903-d6797056a.partitions.topology.kcp.io
11+
storage:
12+
crd: {}
13+
- group: topology.kcp.io
14+
name: partitionsets
15+
schema: v240903-d6797056a.partitionsets.topology.kcp.io
16+
storage:
17+
crd: {}
1018
status: {}

0 commit comments

Comments
 (0)