mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Merge pull request #100446 from masap/staticcheck1
test: Use bytes.Buffer.String
This commit is contained in:
commit
c5e47b72c6
@ -797,8 +797,8 @@ COMMIT
|
|||||||
t.Fatalf("%s: Expected success, got %v", protocol, err)
|
t.Fatalf("%s: Expected success, got %v", protocol, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if string(buffer.Bytes()) != output {
|
if buffer.String() != output {
|
||||||
t.Errorf("%s: Expected output '%s', got '%v'", protocol, output, string(buffer.Bytes()))
|
t.Errorf("%s: Expected output '%s', got '%v'", protocol, output, buffer.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
if fcmd.CombinedOutputCalls != 1 {
|
if fcmd.CombinedOutputCalls != 1 {
|
||||||
@ -817,8 +817,8 @@ COMMIT
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
t.Errorf("%s: Expected failure", protocol)
|
t.Errorf("%s: Expected failure", protocol)
|
||||||
}
|
}
|
||||||
if string(buffer.Bytes()) != stderrOutput {
|
if buffer.String() != stderrOutput {
|
||||||
t.Errorf("%s: Expected output '%s', got '%v'", protocol, stderrOutput, string(buffer.Bytes()))
|
t.Errorf("%s: Expected output '%s', got '%v'", protocol, stderrOutput, buffer.String())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user