MCPcopy Create free account
hub / github.com/devspace-sh/devspace / TestGetChildName

Function TestGetChildName

pkg/devspace/config/loader/patch/path_test.go:24–42  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

22}
23
24func TestGetChildName(t *testing.T) {
25 testCases := map[OpPath]string{
26 ``: ``,
27 `.baz`: `baz`,
28 `$baz`: `baz`,
29 `$`: ``,
30 `*.baz`: `baz`,
31 `*..baz`: `baz`,
32 "deployments['baz']": `baz`,
33 `deployments["baz"]`: `baz`,
34 }
35
36 for input, expected := range testCases {
37 actual := input.getChildName()
38 if expected != actual {
39 t.Errorf("TestCase %s\nactual:%s\nexpected:%s", input, actual, expected)
40 }
41 }
42}
43
44func TestGetParentPath(t *testing.T) {
45 testCases := map[OpPath]string{

Callers

nothing calls this directly

Calls 2

getChildNameMethod · 0.80
ErrorfMethod · 0.45

Tested by

no test coverage detected