Fixed some lint issues in the unit tests for the vmware builder driver parsers.
This commit is contained in:
parent
2a8bc45bc4
commit
32b64e0576
|
@ -150,7 +150,7 @@ subnet 127.0.0.0 netmask 255.255.255.252 {
|
|||
}
|
||||
|
||||
for index := range expected {
|
||||
if string(expected[index]) != string(result[index]) {
|
||||
if string(expected[index]) != result[index] {
|
||||
t.Errorf("unexpected token at index %d: %v != %v", index, expected[index], result[index])
|
||||
}
|
||||
}
|
||||
|
@ -220,23 +220,6 @@ func TestParserDhcpParameters(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func consumeTokensWithSignal(items []string) (chan string, sentinelSignaller) {
|
||||
end := make(sentinelSignaller)
|
||||
out := make(chan string)
|
||||
|
||||
inch := consumeTokens(items)
|
||||
|
||||
go func() {
|
||||
for item := range inch {
|
||||
out <- item
|
||||
}
|
||||
close(out)
|
||||
close(end)
|
||||
}()
|
||||
|
||||
return out, end
|
||||
}
|
||||
|
||||
func consumeDhcpConfig(items []string) (tkGroup, error) {
|
||||
out := make(chan string)
|
||||
tch := consumeTokens(items)
|
||||
|
@ -403,7 +386,7 @@ func TestParserTokenizeNetworkMap(t *testing.T) {
|
|||
}
|
||||
|
||||
for index := range expected {
|
||||
if string(expected[index]) != string(result[index]) {
|
||||
if expected[index] != string(result[index]) {
|
||||
t.Errorf("unexpected token at index %d: %v != %v", index, expected[index], result[index])
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue