mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 10:20:51 +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)
|
||||
}
|
||||
|
||||
if string(buffer.Bytes()) != output {
|
||||
t.Errorf("%s: Expected output '%s', got '%v'", protocol, output, string(buffer.Bytes()))
|
||||
if buffer.String() != output {
|
||||
t.Errorf("%s: Expected output '%s', got '%v'", protocol, output, buffer.String())
|
||||
}
|
||||
|
||||
if fcmd.CombinedOutputCalls != 1 {
|
||||
@ -817,8 +817,8 @@ COMMIT
|
||||
if err == nil {
|
||||
t.Errorf("%s: Expected failure", protocol)
|
||||
}
|
||||
if string(buffer.Bytes()) != stderrOutput {
|
||||
t.Errorf("%s: Expected output '%s', got '%v'", protocol, stderrOutput, string(buffer.Bytes()))
|
||||
if buffer.String() != stderrOutput {
|
||||
t.Errorf("%s: Expected output '%s', got '%v'", protocol, stderrOutput, buffer.String())
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user