Used Pods interface for binding.

This commit is contained in:
Klaus Ma
2017-04-14 11:15:15 +08:00
parent 36d10fed44
commit 47dbb8bbc9
4 changed files with 15 additions and 7 deletions

View File

@@ -432,6 +432,17 @@ func (g TestGroup) ResourcePath(resource, namespace, name string) string {
return g.ResourcePathWithPrefix("", resource, namespace, name)
}
// SubResourcePath returns the appropriate path for the given resource, namespace,
// name and subresource.
func (g TestGroup) SubResourcePath(resource, namespace, name, sub string) string {
path := g.ResourcePathWithPrefix("", resource, namespace, name)
if sub != "" {
path = path + "/" + sub
}
return path
}
func (g TestGroup) RESTMapper() meta.RESTMapper {
return api.Registry.RESTMapper()
}