Fix up tests, and one small bug

This commit is contained in:
James Shubin
2016-08-10 09:15:08 -04:00
parent 0c7b05b233
commit fa4f5abc78
9 changed files with 32 additions and 30 deletions

View File

@@ -27,6 +27,9 @@ import (
// FirstToUpper returns the string with the first character capitalized. // FirstToUpper returns the string with the first character capitalized.
func FirstToUpper(str string) string { func FirstToUpper(str string) string {
if str == "" {
return ""
}
return strings.ToUpper(str[0:1]) + str[1:] return strings.ToUpper(str[0:1]) + str[1:]
} }

View File

@@ -7,7 +7,6 @@
# * you can run mgmt with --max-runtime=<seconds> in special scenarios # * you can run mgmt with --max-runtime=<seconds> in special scenarios
set -o errexit set -o errexit
set -o nounset
set -o pipefail set -o pipefail
timeout --kill-after=3s 1s ./mgmt --help # hello world! timeout --kill-after=3s 1s ./mgmt --help # hello world!

View File

@@ -27,15 +27,15 @@ resources:
edges: edges:
- name: e1 - name: e1
from: from:
res: file kind: file
name: file1 name: file1
to: to:
res: file kind: file
name: file2 name: file2
- name: e2 - name: e2
from: from:
res: file kind: file
name: file2 name: file2
to: to:
res: file kind: file
name: file3 name: file3

View File

@@ -23,6 +23,6 @@ resources:
i am f4, exported from host A i am f4, exported from host A
state: exists state: exists
collect: collect:
- res: file - kind: file
pattern: "/tmp/mgmt/mgmtA/" pattern: "/tmp/mgmt/mgmtA/"
edges: [] edges: []

View File

@@ -23,6 +23,6 @@ resources:
i am f4, exported from host B i am f4, exported from host B
state: exists state: exists
collect: collect:
- res: file - kind: file
pattern: "/tmp/mgmt/mgmtB/" pattern: "/tmp/mgmt/mgmtB/"
edges: [] edges: []

View File

@@ -23,6 +23,6 @@ resources:
i am f4, exported from host C i am f4, exported from host C
state: exists state: exists
collect: collect:
- res: file - kind: file
pattern: "/tmp/mgmt/mgmtC/" pattern: "/tmp/mgmt/mgmtC/"
edges: [] edges: []

View File

@@ -56,22 +56,22 @@ resources:
edges: edges:
- name: e1 - name: e1
from: from:
res: exec kind: exec
name: exec1 name: exec1
to: to:
res: exec kind: exec
name: exec5 name: exec5
- name: e2 - name: e2
from: from:
res: exec kind: exec
name: exec2 name: exec2
to: to:
res: exec kind: exec
name: exec5 name: exec5
- name: e3 - name: e3
from: from:
res: exec kind: exec
name: exec3 name: exec3
to: to:
res: exec kind: exec
name: exec5 name: exec5

View File

@@ -86,43 +86,43 @@ resources:
edges: edges:
- name: e1 - name: e1
from: from:
res: exec kind: exec
name: exec1 name: exec1
to: to:
res: exec kind: exec
name: exec4 name: exec4
- name: e2 - name: e2
from: from:
res: exec kind: exec
name: exec2 name: exec2
to: to:
res: exec kind: exec
name: exec4 name: exec4
- name: e3 - name: e3
from: from:
res: exec kind: exec
name: exec3 name: exec3
to: to:
res: exec kind: exec
name: exec4 name: exec4
- name: e4 - name: e4
from: from:
res: exec kind: exec
name: exec4 name: exec4
to: to:
res: exec kind: exec
name: exec5 name: exec5
- name: e5 - name: e5
from: from:
res: exec kind: exec
name: exec4 name: exec4
to: to:
res: exec kind: exec
name: exec6 name: exec6
- name: e6 - name: e6
from: from:
res: exec kind: exec
name: exec4 name: exec4
to: to:
res: exec kind: exec
name: exec7 name: exec7

View File

@@ -27,15 +27,15 @@ resources:
edges: edges:
- name: e1 - name: e1
from: from:
res: file kind: file
name: file1 name: file1
to: to:
res: file kind: file
name: file2 name: file2
- name: e2 - name: e2
from: from:
res: file kind: file
name: file2 name: file2
to: to:
res: file kind: file
name: file3 name: file3