MCPcopy
hub / github.com/redspread/spread / TestObjectPath

Function TestObjectPath

pkg/deploy/object_test.go:11–26  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func TestObjectPath(t *testing.T) {
12 rc := &kube.ReplicationController{
13 TypeMeta: unversioned.TypeMeta{
14 APIVersion: "v1",
15 },
16 ObjectMeta: kube.ObjectMeta{
17 Name: "johnson",
18 Namespace: kube.NamespaceDefault,
19 },
20 }
21
22 expected := "namespaces/default/replicationcontroller/johnson"
23 actual, err := ObjectPath(rc)
24 assert.NoError(t, err)
25 assert.Equal(t, expected, actual)
26}
27
28func TestObjectPathNoNamespace(t *testing.T) {
29 rc := &kube.ReplicationController{

Callers

nothing calls this directly

Calls 2

ObjectPathFunction · 0.85
EqualMethod · 0.45

Tested by

no test coverage detected