Skip to content

Commit

Permalink
apimachinery: Fix Dropped Test Error (#85427)
Browse files Browse the repository at this point in the history
* apimachinery: fix dropped test error in pkg/util/net

* apimachinery: fix dropped test error in pkg/runtime/serializer

* apimachinery: fix dropped test error in pkg/conversion

* apimachinery: fix staticcheck warning
  • Loading branch information
alrs authored and k8s-ci-robot committed Nov 23, 2019
1 parent 459b1d7 commit b1c39e9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
1 change: 0 additions & 1 deletion hack/.staticcheck_failures
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation
vendor/k8s.io/apimachinery/pkg/conversion
vendor/k8s.io/apimachinery/pkg/labels
vendor/k8s.io/apimachinery/pkg/runtime
vendor/k8s.io/apimachinery/pkg/runtime/serializer
vendor/k8s.io/apimachinery/pkg/runtime/serializer/json
vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning
vendor/k8s.io/apimachinery/pkg/util/framer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,9 @@ func TestConverter_MapElemAddr(t *testing.T) {
}
third := Foo{}
err = c.Convert(&second, &third, AllowDifferentFieldTypeNames, nil)
if err != nil {
t.Fatalf("error on Convert: %v", err)
}
if e, a := first, third; !reflect.DeepEqual(e, a) {
t.Errorf("Unexpected diff: %v", diff.ObjectDiff(e, a))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,9 @@ func TestDirectCodec(t *testing.T) {
t.Fatal(string(out))
}
a, _, err := directDecoder.Decode(out, nil, nil)
if err != nil {
t.Fatalf("error on Decode: %v", err)
}
e := &serializertesting.ExternalTestType1{
MyWeirdCustomEmbeddedVersionKindField: serializertesting.MyWeirdCustomEmbeddedVersionKindField{
APIVersion: "v1",
Expand Down
1 change: 1 addition & 0 deletions staging/src/k8s.io/apimachinery/pkg/util/net/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ func TestConnectWithRedirects(t *testing.T) {
require.NoError(t, err, "unexpected request error")

result, err := ioutil.ReadAll(resp.Body)
assert.Nil(t, err)
require.NoError(t, resp.Body.Close())
if test.expectedRedirects < len(test.redirects) {
// Expect the last redirect to be returned.
Expand Down

0 comments on commit b1c39e9

Please sign in to comment.