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, Decorator: generic.UndecoratedStorage,
EnableGarbageCollection: t.EnableGarbageCollection, EnableGarbageCollection: t.EnableGarbageCollection,
DeleteCollectionWorkers: t.DeleteCollectionWorkers, DeleteCollectionWorkers: t.DeleteCollectionWorkers,
ResourcePrefix: t.StoragePrefix + "/" + resource.Group + "/" + resource.Resource, ResourcePrefix: resource.Group + "/" + resource.Resource,
} }
if t.EnableWatchCache { if t.EnableWatchCache {
ret.Decorator = genericregistry.StorageWithCacher(t.DefaultWatchCacheSize) ret.Decorator = genericregistry.StorageWithCacher(t.DefaultWatchCacheSize)

View File

@@ -382,7 +382,7 @@ func TestEtcdStorage(t *testing.T) {
expectedObject *metaObject expectedObject *metaObject
}{ }{
"namespacedNoxuDefinition": { "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{ expectedObject: &metaObject{
Kind: "CustomResourceDefinition", Kind: "CustomResourceDefinition",
APIVersion: "apiextensions.k8s.io/v1beta1", APIVersion: "apiextensions.k8s.io/v1beta1",
@@ -394,7 +394,7 @@ func TestEtcdStorage(t *testing.T) {
}, },
}, },
"namespacedNoxuInstance": { "namespacedNoxuInstance": {
etcdPath: path.Join("/", etcdPrefix, "mygroup.example.com/noxus/the-cruel-default/foo"), etcdPath: "mygroup.example.com/noxus/the-cruel-default/foo",
expectedObject: &metaObject{ expectedObject: &metaObject{
Kind: "WishIHadChosenNoxu", Kind: "WishIHadChosenNoxu",
APIVersion: "mygroup.example.com/v1beta1", APIVersion: "mygroup.example.com/v1beta1",
@@ -420,7 +420,7 @@ func TestEtcdStorage(t *testing.T) {
}, },
"clusteredCurletInstance": { "clusteredCurletInstance": {
etcdPath: path.Join("/", etcdPrefix, "mygroup.example.com/curlets/bar"), etcdPath: "mygroup.example.com/curlets/bar",
expectedObject: &metaObject{ expectedObject: &metaObject{
Kind: "Curlet", Kind: "Curlet",
APIVersion: "mygroup.example.com/v1beta1", APIVersion: "mygroup.example.com/v1beta1",