From a1178a13aaf2a88e38ec95e5dcf1cacd9dc83360 Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Sat, 17 Jun 2023 12:01:26 +0300 Subject: [PATCH] openapi3: fix tests --- openapi3/encoding_test.go | 2 +- openapi3/issue542_test.go | 2 +- openapi3/issue615_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openapi3/encoding_test.go b/openapi3/encoding_test.go index 5c354540d..cbfbfd0bd 100644 --- a/openapi3/encoding_test.go +++ b/openapi3/encoding_test.go @@ -19,7 +19,7 @@ func TestEncodingJSON(t *testing.T) { docA := &Encoding{} err = json.Unmarshal(encodingJSON, &docA) require.NoError(t, err) - require.NotEmpty(t, data) + require.NotEmpty(t, docA) t.Log("Validate *openapi3.Encoding") err = docA.Validate(context.Background()) diff --git a/openapi3/issue542_test.go b/openapi3/issue542_test.go index 05f5db64d..add8c7b43 100644 --- a/openapi3/issue542_test.go +++ b/openapi3/issue542_test.go @@ -32,6 +32,6 @@ components: doc, err := sl.LoadFromData(spec) require.NoError(t, err) - doc.Validate(sl.Context) + err = doc.Validate(sl.Context) require.NoError(t, err) } diff --git a/openapi3/issue615_test.go b/openapi3/issue615_test.go index 496a972bb..67144e9e1 100644 --- a/openapi3/issue615_test.go +++ b/openapi3/issue615_test.go @@ -29,6 +29,6 @@ func TestIssue615(t *testing.T) { doc, err := loader.LoadFromFile("testdata/recursiveRef/issue615.yml") require.NoError(t, err) - doc.Validate(loader.Context) + err = doc.Validate(loader.Context) require.NoError(t, err) }