Tests were hanging, stopped JSON parsing channel use altogether

vacuum will need looking at for this later version.
This commit is contained in:
Dave Shanley
2022-12-13 14:09:15 -05:00
parent 724fdb31c4
commit ece888d201
3 changed files with 2 additions and 22 deletions

View File

@@ -115,7 +115,6 @@ info:
func TestExtractSpecInfo_ValidJSON(t *testing.T) {
r, e := ExtractSpecInfo([]byte(goodJSON))
<-r.JsonParsingChannel
assert.Greater(t, len(*r.SpecJSONBytes), 0)
assert.Error(t, e)
}
@@ -132,7 +131,6 @@ func TestExtractSpecInfo_Nothing(t *testing.T) {
func TestExtractSpecInfo_ValidYAML(t *testing.T) {
r, e := ExtractSpecInfo([]byte(goodYAML))
<-r.JsonParsingChannel
assert.Greater(t, len(*r.SpecJSONBytes), 0)
assert.Error(t, e)
}
@@ -153,8 +151,6 @@ func TestExtractSpecInfo_OpenAPI3(t *testing.T) {
assert.Nil(t, e)
assert.Equal(t, utils.OpenApi3, r.SpecType)
assert.Equal(t, "3.0.1", r.Version)
<-r.JsonParsingChannel
assert.Greater(t, len(*r.SpecJSONBytes), 0)
}
@@ -188,8 +184,6 @@ func TestExtractSpecInfo_OpenAPI2(t *testing.T) {
assert.Nil(t, e)
assert.Equal(t, OpenApi2, r.SpecType)
assert.Equal(t, "2.0.1", r.Version)
<-r.JsonParsingChannel
assert.Greater(t, len(*r.SpecJSONBytes), 0)
}
@@ -207,7 +201,6 @@ func TestExtractSpecInfo_AsyncAPI(t *testing.T) {
assert.Nil(t, e)
assert.Equal(t, AsyncApi, r.SpecType)
assert.Equal(t, "2.0.0", r.Version)
<-r.JsonParsingChannel
assert.Greater(t, len(*r.SpecJSONBytes), 0)
}