New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collapse on top of upstream ETCD storage test #21412
Collapse on top of upstream ETCD storage test #21412
Conversation
@@ -195,8 +195,7 @@ func BuildStorageFactory(server *kapiserveroptions.ServerRunOptions, enforcedSto | |||
storageFactory.AddCohabitatingResources(apps.Resource("replicasets"), extensions.Resource("replicasets")) | |||
storageFactory.AddCohabitatingResources(networking.Resource("networkpolicies"), extensions.Resource("networkpolicies")) | |||
storageFactory.AddCohabitatingResources(security.Resource("securitycontextconstraints"), kapi.Resource("securitycontextconstraints")) | |||
// TODO: switch to prefer policy API group in 3.11 | |||
storageFactory.AddCohabitatingResources(extensions.Resource("podsecuritypolicies"), policy.Resource("podsecuritypolicies")) | |||
storageFactory.AddCohabitatingResources(policy.Resource("podsecuritypolicies"), extensions.Resource("podsecuritypolicies")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This matters? If so, it means we're testing the wrong thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Artifact from earlier code, dropped.
fc15add
to
38531a1
Compare
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nit wrt apiservices and you're good to go.
@@ -898,6 +521,78 @@ func TestEtcd3StoragePath(t *testing.T) { | |||
t.Fatalf("error creating test namespace: %#v", err) | |||
} | |||
|
|||
etcdStorageData := etcddata.GetEtcdStorageData() | |||
|
|||
// TODO storage is broken somehow. failing on v1beta1 serialization |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind creating an issue about that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gvk *schema.GroupVersionKind | ||
} | ||
|
||
// TODO we store these in the wrong place and version in etcd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix this, master team will be addressing those as part of the migration story we own: https://jira.coreos.com/browse/MSTR-213
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@deads2k I thought you fixed that one, didn't you?
38531a1
to
80b6fec
Compare
…ices This reverts commit 5399017.
This change updates the ETCD storage test so that its data is exported. Thus it can be used by other tests. The dry run test was updated to consume this data instead of having a duplicate copy. The code to start a master that can be used for "one of every resource" style tests was also factored out. It is reused in the dry run test as well. This prevents these tests from drifting in the future and reduces the long term maintenance burden. Signed-off-by: Monis Khan <mkhan@redhat.com>
We do not have the REST storage for these resources yet. Signed-off-by: Monis Khan <mkhan@redhat.com>
This change updates the etcd storage path test to exercise custom resource storage by creating custom resource definitions before running the test. Duplicated custom resource definition test logic was consolidated. Signed-off-by: Monis Khan <mkhan@redhat.com>
Signed-off-by: Monis Khan <mkhan@redhat.com>
Signed-off-by: Monis Khan <mkhan@redhat.com>
This change updates the OpenShift ETCD storage test to reuse the upstream ETCD storage test's data. This makes it easy for us to keep up with upstream changes. It also makes it clear in which areas we differ. Signed-off-by: Monis Khan <mkhan@redhat.com>
Signed-off-by: Monis Khan <mkhan@redhat.com>
80b6fec
to
a1efaa6
Compare
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
Bypassing approve since we are just reverting a patch master team is working on removing. |
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: enj, soltysh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
UPSTREAM: 70019: Refactor dry run test to reuse ETCD storage data
This change updates the ETCD storage test so that its data is
exported. Thus it can be used by other tests. The dry run test was
updated to consume this data instead of having a duplicate copy.
The code to start a master that can be used for "one of every
resource" style tests was also factored out. It is reused in the
dry run test as well.
This prevents these tests from drifting in the future and reduces
the long term maintenance burden.
Signed-off-by: Monis Khan mkhan@redhat.com
UPSTREAM: : 70019: Remove too new ETCD storage data
We do not have the REST storage for these resources yet.
Signed-off-by: Monis Khan mkhan@redhat.com
Remove dead code from ETCD storage test
Signed-off-by: Monis Khan mkhan@redhat.com
Use new exported types in ETCD storage test
Signed-off-by: Monis Khan mkhan@redhat.com
Collapse on top of upstream ETCD storage test
This change updates the OpenShift ETCD storage test to reuse the
upstream ETCD storage test's data. This makes it easy for us to
keep up with upstream changes. It also makes it clear in which
areas we differ.
Signed-off-by: Monis Khan mkhan@redhat.com
Use upstream etcddata.GetResources in ETCD storage test
Signed-off-by: Monis Khan mkhan@redhat.com
/assign @deads2k @soltysh
@openshift/sig-master