Coverage bumped again

however, more hardening is required, Asana is getting upset with changes found when rendering, so that's up next. Then, we will need to harden against few others.
This commit is contained in:
Dave Shanley
2023-03-22 10:03:17 -04:00
parent cecee1ca73
commit cd3011655c
5 changed files with 140 additions and 30 deletions

View File

@@ -201,6 +201,39 @@ func TestDocument_RenderAndReload_ChangeCheck_Stripe(t *testing.T) {
}
//func TestDocument_RenderAndReload_ChangeCheck_Asana(t *testing.T) {
//
// bs, _ := os.ReadFile("test_specs/asana.yaml")
// doc, _ := NewDocument(bs)
// doc.BuildV3Model()
//
// _, newDoc, _, _ := doc.RenderAndReload()
//
// // compare documents
// compReport, errs := CompareDocuments(doc, newDoc)
//
// // get flat list of changes.
// flatChanges := compReport.GetAllChanges()
//
// // remove everything that is a description change (stripe has a lot of those from having 519 empty descriptions)
// var filtered []*model.Change
// for i := range flatChanges {
// if flatChanges[i].Property != "description" {
// filtered = append(filtered, flatChanges[i])
// }
// }
//
// assert.Nil(t, errs)
// tc := compReport.TotalChanges()
// bc := compReport.TotalBreakingChanges()
// assert.Equal(t, 0, bc)
// assert.Equal(t, 519, tc)
//
// // there should be no other changes than the 519 descriptions.
// assert.Equal(t, 0, len(filtered))
//
//}
func TestDocument_RenderAndReload(t *testing.T) {
// load an OpenAPI 3 specification from bytes