diff --git a/misc.go b/misc.go index de1c46a4..93cbccc8 100644 --- a/misc.go +++ b/misc.go @@ -27,6 +27,9 @@ import ( // FirstToUpper returns the string with the first character capitalized. func FirstToUpper(str string) string { + if str == "" { + return "" + } return strings.ToUpper(str[0:1]) + str[1:] } diff --git a/test/shell/t1.sh b/test/shell/t1.sh index 4adfe46a..ad0084c9 100755 --- a/test/shell/t1.sh +++ b/test/shell/t1.sh @@ -7,7 +7,6 @@ # * you can run mgmt with --max-runtime= in special scenarios set -o errexit -set -o nounset set -o pipefail timeout --kill-after=3s 1s ./mgmt --help # hello world! diff --git a/test/shell/t2.yaml b/test/shell/t2.yaml index 1dd94c9a..f69394ee 100644 --- a/test/shell/t2.yaml +++ b/test/shell/t2.yaml @@ -27,15 +27,15 @@ resources: edges: - name: e1 from: - res: file + kind: file name: file1 to: - res: file + kind: file name: file2 - name: e2 from: - res: file + kind: file name: file2 to: - res: file + kind: file name: file3 diff --git a/test/shell/t3-a.yaml b/test/shell/t3-a.yaml index 6664b4b0..18242b37 100644 --- a/test/shell/t3-a.yaml +++ b/test/shell/t3-a.yaml @@ -23,6 +23,6 @@ resources: i am f4, exported from host A state: exists collect: -- res: file +- kind: file pattern: "/tmp/mgmt/mgmtA/" edges: [] diff --git a/test/shell/t3-b.yaml b/test/shell/t3-b.yaml index c4d19f7b..cb481530 100644 --- a/test/shell/t3-b.yaml +++ b/test/shell/t3-b.yaml @@ -23,6 +23,6 @@ resources: i am f4, exported from host B state: exists collect: -- res: file +- kind: file pattern: "/tmp/mgmt/mgmtB/" edges: [] diff --git a/test/shell/t3-c.yaml b/test/shell/t3-c.yaml index 68268682..8e4596af 100644 --- a/test/shell/t3-c.yaml +++ b/test/shell/t3-c.yaml @@ -23,6 +23,6 @@ resources: i am f4, exported from host C state: exists collect: -- res: file +- kind: file pattern: "/tmp/mgmt/mgmtC/" edges: [] diff --git a/test/shell/t4.yaml b/test/shell/t4.yaml index 4c7b6ae5..9fe6bb0b 100644 --- a/test/shell/t4.yaml +++ b/test/shell/t4.yaml @@ -56,22 +56,22 @@ resources: edges: - name: e1 from: - res: exec + kind: exec name: exec1 to: - res: exec + kind: exec name: exec5 - name: e2 from: - res: exec + kind: exec name: exec2 to: - res: exec + kind: exec name: exec5 - name: e3 from: - res: exec + kind: exec name: exec3 to: - res: exec + kind: exec name: exec5 diff --git a/test/shell/t5.yaml b/test/shell/t5.yaml index 41a6cac8..fc7c7dfd 100644 --- a/test/shell/t5.yaml +++ b/test/shell/t5.yaml @@ -86,43 +86,43 @@ resources: edges: - name: e1 from: - res: exec + kind: exec name: exec1 to: - res: exec + kind: exec name: exec4 - name: e2 from: - res: exec + kind: exec name: exec2 to: - res: exec + kind: exec name: exec4 - name: e3 from: - res: exec + kind: exec name: exec3 to: - res: exec + kind: exec name: exec4 - name: e4 from: - res: exec + kind: exec name: exec4 to: - res: exec + kind: exec name: exec5 - name: e5 from: - res: exec + kind: exec name: exec4 to: - res: exec + kind: exec name: exec6 - name: e6 from: - res: exec + kind: exec name: exec4 to: - res: exec + kind: exec name: exec7 diff --git a/test/shell/t6.yaml b/test/shell/t6.yaml index 1dd94c9a..f69394ee 100644 --- a/test/shell/t6.yaml +++ b/test/shell/t6.yaml @@ -27,15 +27,15 @@ resources: edges: - name: e1 from: - res: file + kind: file name: file1 to: - res: file + kind: file name: file2 - name: e2 from: - res: file + kind: file name: file2 to: - res: file + kind: file name: file3