diff --git a/staging/src/k8s.io/apiextensions-apiserver/test/integration/yaml_test.go b/staging/src/k8s.io/apiextensions-apiserver/test/integration/yaml_test.go index 1782e1a9e27..9f23427f02f 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/test/integration/yaml_test.go +++ b/staging/src/k8s.io/apiextensions-apiserver/test/integration/yaml_test.go @@ -309,7 +309,7 @@ values: { yamlBody := []byte(fmt.Sprintf(` values: - numVal: 3`, apiVersion, kind, uid, resourceVersion)) + numVal: 3`)) result, err := rest.Patch(types.MergePatchType). SetHeader("Accept", "application/yaml"). SetHeader("Content-Type", "application/yaml"). diff --git a/staging/src/k8s.io/apimachinery/pkg/util/net/interface_test.go b/staging/src/k8s.io/apimachinery/pkg/util/net/interface_test.go index 5f42852cee2..4799d43aea0 100644 --- a/staging/src/k8s.io/apimachinery/pkg/util/net/interface_test.go +++ b/staging/src/k8s.io/apimachinery/pkg/util/net/interface_test.go @@ -623,7 +623,7 @@ func TestFailGettingIPv4Routes(t *testing.T) { errStrFrag := "no such file" _, err := v4File.extract() if err == nil { - fmt.Errorf("Expected error trying to read non-existent v4 route file") + t.Errorf("Expected error trying to read non-existent v4 route file") } if !strings.Contains(err.Error(), errStrFrag) { t.Errorf("Unable to find %q in error string %q", errStrFrag, err.Error()) @@ -638,7 +638,7 @@ func TestFailGettingIPv6Routes(t *testing.T) { errStrFrag := "no such file" _, err := v6File.extract() if err == nil { - fmt.Errorf("Expected error trying to read non-existent v6 route file") + t.Errorf("Expected error trying to read non-existent v6 route file") } if !strings.Contains(err.Error(), errStrFrag) { t.Errorf("Unable to find %q in error string %q", errStrFrag, err.Error()) @@ -653,7 +653,7 @@ func TestGetAllDefaultRoutesFailNoV4RouteFile(t *testing.T) { errStrFrag := "no such file" _, err := getAllDefaultRoutes() if err == nil { - fmt.Errorf("Expected error trying to read non-existent v4 route file") + t.Errorf("Expected error trying to read non-existent v4 route file") } if !strings.Contains(err.Error(), errStrFrag) { t.Errorf("Unable to find %q in error string %q", errStrFrag, err.Error()) diff --git a/staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cache_test.go b/staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cache_test.go index d4e9adff7a7..d1ae1fc8277 100644 --- a/staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cache_test.go +++ b/staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cache_test.go @@ -77,13 +77,13 @@ func testCache(cache cache, t *testing.T) { // when empty, record is stored cache.set("foo", record1, time.Hour) if result, ok := cache.get("foo"); !ok || result != record1 { - t.Errorf("Expected %#v, true, got %#v, %v", record1, ok) + t.Errorf("Expected %#v, true, got %#v, %v", record1, result, ok) } // newer record overrides cache.set("foo", record2, time.Hour) if result, ok := cache.get("foo"); !ok || result != record2 { - t.Errorf("Expected %#v, true, got %#v, %v", record2, ok) + t.Errorf("Expected %#v, true, got %#v, %v", record2, result, ok) } // removing the current value removes diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/filters/audit_test.go b/staging/src/k8s.io/apiserver/pkg/endpoints/filters/audit_test.go index fe0317d73b5..a7c1486a700 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/filters/audit_test.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/filters/audit_test.go @@ -848,7 +848,7 @@ func TestAuditIDHttpHeader(t *testing.T) { } } else { if resp.Header.Get("Audit-ID") != "" { - t.Errorf("[%s] expected no Audit-ID http header returned, but got %p", test.desc, resp.Header.Get("Audit-ID")) + t.Errorf("[%s] expected no Audit-ID http header returned, but got %s", test.desc, resp.Header.Get("Audit-ID")) } } } diff --git a/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/grpc_service_unix_test.go b/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/grpc_service_unix_test.go index 814da3b4bfd..ecebb4da006 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/grpc_service_unix_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/grpc_service_unix_test.go @@ -14,9 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package envelope transforms values for storage at rest using a Envelope provider + // +build !windows -// Package envelope transforms values for storage at rest using a Envelope provider package envelope import ( diff --git a/staging/src/k8s.io/client-go/util/certificate/certificate_manager_test.go b/staging/src/k8s.io/client-go/util/certificate/certificate_manager_test.go index c48f7a7211d..6a23f04260d 100644 --- a/staging/src/k8s.io/client-go/util/certificate/certificate_manager_test.go +++ b/staging/src/k8s.io/client-go/util/certificate/certificate_manager_test.go @@ -206,7 +206,7 @@ func TestSetRotationDeadline(t *testing.T) { t.Errorf("%d metrics were recorded, wanted %d", g.calls, 1) } if g.lastValue != float64(tc.notAfter.Unix()) { - t.Errorf("%d value for metric was recorded, wanted %d", g.lastValue, tc.notAfter.Unix()) + t.Errorf("%f value for metric was recorded, wanted %d", g.lastValue, tc.notAfter.Unix()) } }) }