Skip to content

Commit dbe950b

Browse files
Merge pull request #28458 from soltysh/etcd_test
OCPNODE-1892: Update etcd test data for 1.29 release
2 parents 7ae0871 + 33fe4a6 commit dbe950b

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

test/extended/etcd/etcd_storage_path.go

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ func testEtcd3StoragePath(t g.GinkgoTInterface, oc *exutil.CLI, etcdClient3Fn fu
286286
for k, a := range map[schema.GroupVersionResource]etcddata.StorageData{
287287
// Added etcd data.
288288
// TODO: When rebase has started, add etcd storage data has been added to
289-
// k8s.io/kubernetes/test/integration/etcd/data.go in the 1.27 release.
289+
// k8s.io/kubernetes/test/integration/etcd/data.go in the 1.29 release.
290290

291291
// compare https://github.com/kubernetes/kubernetes/pull/121089
292292
gvr("flowcontrol.apiserver.k8s.io", "v1", "flowschemas"): {
@@ -308,11 +308,23 @@ func testEtcd3StoragePath(t g.GinkgoTInterface, oc *exutil.CLI, etcdClient3Fn fu
308308

309309
// Modified etcd data.
310310
// TODO: When rebase has started, fixup etcd storage data that has been modified
311-
// in k8s.io/kubernetes/test/integration/etcd/data.go in the 1.27 release.
311+
// in k8s.io/kubernetes/test/integration/etcd/data.go in the 1.29 release.
312+
313+
// compare https://github.com/kubernetes/kubernetes/pull/120018
314+
etcdStorageData[gvr("admissionregistration.k8s.io", "v1alpha1", "validatingadmissionpolicies")] = etcddata.StorageData{
315+
Stub: `{"metadata":{"name":"vap1","creationTimestamp":null},"spec":{"paramKind":{"apiVersion":"test.example.com/v1","kind":"Example"},"matchConstraints":{"resourceRules": [{"resourceNames": ["fakeName"], "apiGroups":["apps"],"apiVersions":["v1"],"operations":["CREATE", "UPDATE"], "resources":["deployments"]}]},"validations":[{"expression":"object.spec.replicas <= params.maxReplicas","message":"Too many replicas"}]}}`,
316+
ExpectedEtcdPath: "/registry/validatingadmissionpolicies/vap1",
317+
ExpectedGVK: gvkP("admissionregistration.k8s.io", "v1beta1", "ValidatingAdmissionPolicy"),
318+
}
319+
etcdStorageData[gvr("admissionregistration.k8s.io", "v1alpha1", "validatingadmissionpolicybindings")] = etcddata.StorageData{
320+
Stub: `{"metadata":{"name":"pb1","creationTimestamp":null},"spec":{"policyName":"replicalimit-policy.example.com","paramRef":{"name":"replica-limit-test.example.com"},"validationActions":["Deny"]}}`,
321+
ExpectedEtcdPath: "/registry/validatingadmissionpolicybindings/pb1",
322+
ExpectedGVK: gvkP("admissionregistration.k8s.io", "v1beta1", "ValidatingAdmissionPolicyBinding"),
323+
}
312324

313325
// Removed etcd data.
314326
// TODO: When rebase has started, remove etcd storage data that has been removed
315-
// from k8s.io/kubernetes/test/integration/etcd/data.go in the 1.27 release.
327+
// from k8s.io/kubernetes/test/integration/etcd/data.go in the 1.29 release.
316328
removeStorageData(t, etcdStorageData)
317329
}
318330

0 commit comments

Comments
 (0)