Skip to content

Commit

Permalink
Change TestIssue542 and TestIssue615
Browse files Browse the repository at this point in the history
  • Loading branch information
ShouheiNishi committed Dec 13, 2022
1 parent 9fb1ee3 commit c8213b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
3 changes: 1 addition & 2 deletions openapi3/issue542_test.go
Expand Up @@ -10,6 +10,5 @@ func TestIssue542(t *testing.T) {
sl := NewLoader()

_, err := sl.LoadFromFile("testdata/issue542.yml")
require.Error(t, err)
require.Contains(t, err.Error(), CircularReferenceError)
require.NoError(t, err)
}
10 changes: 2 additions & 8 deletions openapi3/issue615_test.go
Expand Up @@ -9,17 +9,11 @@ import (
)

func TestIssue615(t *testing.T) {
for {
{
loader := openapi3.NewLoader()
loader.IsExternalRefsAllowed = true
_, err := loader.LoadFromFile("testdata/recursiveRef/issue615.yml")
if err == nil {
continue
}
// Test currently reproduces the issue 615: failure to load a valid spec
// Upon issue resolution, this check should be changed to require.NoError
require.Error(t, err, openapi3.CircularReferenceError)
break
require.NoError(t, err)
}

var old int
Expand Down

0 comments on commit c8213b6

Please sign in to comment.