Skip to content

Commit

Permalink
Merge pull request #28435 from soltysh/etcd_storage_test
Browse files Browse the repository at this point in the history
OCPNODE-1892: Update ETCD storage data for k8s 1.29
  • Loading branch information
openshift-merge-bot[bot] committed Dec 2, 2023
2 parents 80b0ef7 + 1d4e013 commit 5b587d9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Makefile
Expand Up @@ -37,6 +37,10 @@ build-docs:
hack/generate-docs.sh
.PHONY: build-docs

openshift-tests: GO_BUILD_PACKAGES :=./cmd/openshift-tests
openshift-tests: build
.PHONY: openshift-tests

# run repo-specific checks.
#
# Example:
Expand Down
14 changes: 13 additions & 1 deletion test/extended/etcd/etcd_storage_path.go
Expand Up @@ -282,11 +282,23 @@ func testEtcd3StoragePath(t g.GinkgoTInterface, oc *exutil.CLI, etcdClient3Fn fu
// Apply output of git diff origin/release-1.XY origin/release-1.X(Y+1) test/integration/etcd/data.go. This is needed
// to apply the right data depending on the kube version of the running server. Replace this with the next current
// and rebase version next time. Don't pile them up.
if strings.HasPrefix(version.Minor, "27") {
if strings.HasPrefix(version.Minor, "29") {
for k, a := range map[schema.GroupVersionResource]etcddata.StorageData{
// Added etcd data.
// TODO: When rebase has started, add etcd storage data has been added to
// k8s.io/kubernetes/test/integration/etcd/data.go in the 1.27 release.

// compare https://github.com/kubernetes/kubernetes/pull/121089
gvr("flowcontrol.apiserver.k8s.io", "v1", "flowschemas"): {
Stub: `{"metadata": {"name": "fs-3"}, "spec": {"priorityLevelConfiguration": {"name": "name1"}}}`,
ExpectedEtcdPath: "/registry/flowschemas/fs-3",
ExpectedGVK: gvkP("flowcontrol.apiserver.k8s.io", "v1beta3", "FlowSchema"),
},
gvr("flowcontrol.apiserver.k8s.io", "v1", "prioritylevelconfigurations"): {
Stub: `{"metadata": {"name": "conf5"}, "spec": {"type": "Limited", "limited": {"nominalConcurrencyShares":3, "limitResponse": {"type": "Reject"}}}}`,
ExpectedEtcdPath: "/registry/prioritylevelconfigurations/conf5",
ExpectedGVK: gvkP("flowcontrol.apiserver.k8s.io", "v1beta3", "PriorityLevelConfiguration"),
},
} {
if _, preexisting := etcdStorageData[k]; preexisting {
t.Errorf("upstream etcd storage data already has data for %v. Update current and rebase version diff to next rebase version", k)
Expand Down

0 comments on commit 5b587d9

Please sign in to comment.