(t *testing.T)
| 9 | ) |
| 10 | |
| 11 | func 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 | |
| 28 | func TestObjectPathNoNamespace(t *testing.T) { |
| 29 | rc := &kube.ReplicationController{ |
nothing calls this directly
no test coverage detected