(t *testing.T)
| 179 | } |
| 180 | |
| 181 | func TestRequestSetTwiceError(t *testing.T) { |
| 182 | if (&Request{}).Name("bar").Name("baz").err == nil { |
| 183 | t.Errorf("setting name twice should result in error") |
| 184 | } |
| 185 | if (&Request{}).Namespace("bar").Namespace("baz").err == nil { |
| 186 | t.Errorf("setting namespace twice should result in error") |
| 187 | } |
| 188 | if (&Request{}).Resource("bar").Resource("baz").err == nil { |
| 189 | t.Errorf("setting resource twice should result in error") |
| 190 | } |
| 191 | if (&Request{}).SubResource("bar").SubResource("baz").err == nil { |
| 192 | t.Errorf("setting subresource twice should result in error") |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | func TestInvalidSegments(t *testing.T) { |
| 197 | invalidSegments := []string{".", "..", "test/segment", "test%2bsegment"} |
nothing calls this directly
no test coverage detected