From c3d9d9a5746cbc81fac0469487fce13868f373d8 Mon Sep 17 00:00:00 2001 From: mbohlool Date: Thu, 3 Nov 2016 05:57:41 -0700 Subject: [PATCH] Enable OpenAPI spec validation --- pkg/master/master_test.go | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/pkg/master/master_test.go b/pkg/master/master_test.go index 224dae6ef83..c375ced7547 100644 --- a/pkg/master/master_test.go +++ b/pkg/master/master_test.go @@ -343,21 +343,14 @@ func TestValidOpenAPISpec(t *testing.T) { assert.NoError(res.AsError()) } - // TODO(mehdy): The actual validation part of these tests are timing out on jerkin but passing locally. Enable it after debugging timeout issue. - disableValidation := true - // Validate OpenApi spec doc, err := loads.Spec(server.URL + "/swagger.json") if assert.NoError(err) { validator := validate.NewSpecValidator(doc.Schema(), strfmt.Default) - if !disableValidation { - res, warns := validator.Validate(doc) - assert.NoError(res.AsError()) - if !warns.IsValid() { - t.Logf("Open API spec on root has some warnings : %v", warns) - } - } else { - t.Logf("Validation is disabled because it is timing out on jenkins put passing locally.") + res, warns := validator.Validate(doc) + assert.NoError(res.AsError()) + if !warns.IsValid() { + t.Logf("Open API spec on root has some warnings : %v", warns) } } }