remove extra prefix from CRs

This commit is contained in:
deads2k
2017-06-06 13:25:54 -04:00
parent 04477ff90c
commit 6cb18cae82
2 changed files with 4 additions and 4 deletions

View File

@@ -401,7 +401,7 @@ func (t CRDRESTOptionsGetter) GetRESTOptions(resource schema.GroupResource) (gen
Decorator: generic.UndecoratedStorage,
EnableGarbageCollection: t.EnableGarbageCollection,
DeleteCollectionWorkers: t.DeleteCollectionWorkers,
ResourcePrefix: t.StoragePrefix + "/" + resource.Group + "/" + resource.Resource,
ResourcePrefix: resource.Group + "/" + resource.Resource,
}
if t.EnableWatchCache {
ret.Decorator = genericregistry.StorageWithCacher(t.DefaultWatchCacheSize)

View File

@@ -382,7 +382,7 @@ func TestEtcdStorage(t *testing.T) {
expectedObject *metaObject
}{
"namespacedNoxuDefinition": {
etcdPath: path.Join("/", etcdPrefix, "apiextensions.k8s.io/customresourcedefinitions/noxus.mygroup.example.com"), // TODO: Double check this, no namespace?
etcdPath: path.Join("/", etcdPrefix, "apiextensions.k8s.io/customresourcedefinitions/noxus.mygroup.example.com"),
expectedObject: &metaObject{
Kind: "CustomResourceDefinition",
APIVersion: "apiextensions.k8s.io/v1beta1",
@@ -394,7 +394,7 @@ func TestEtcdStorage(t *testing.T) {
},
},
"namespacedNoxuInstance": {
etcdPath: path.Join("/", etcdPrefix, "mygroup.example.com/noxus/the-cruel-default/foo"),
etcdPath: "mygroup.example.com/noxus/the-cruel-default/foo",
expectedObject: &metaObject{
Kind: "WishIHadChosenNoxu",
APIVersion: "mygroup.example.com/v1beta1",
@@ -420,7 +420,7 @@ func TestEtcdStorage(t *testing.T) {
},
"clusteredCurletInstance": {
etcdPath: path.Join("/", etcdPrefix, "mygroup.example.com/curlets/bar"),
etcdPath: "mygroup.example.com/curlets/bar",
expectedObject: &metaObject{
Kind: "Curlet",
APIVersion: "mygroup.example.com/v1beta1",