diff --git a/testing/coreruleset/.ftw.yml b/testing/coreruleset/.ftw.yml index 0430651d..5e3d8df9 100644 --- a/testing/coreruleset/.ftw.yml +++ b/testing/coreruleset/.ftw.yml @@ -1,6 +1,7 @@ --- testoverride: ignore: + 920100-4: 'Invalid uri, Coraza not reached - 404 page not found' 920100-5: 'Invalid uri, Coraza not reached - 404 page not found' 930110-7: 'CRS issue: https://github.com/coreruleset/coreruleset/issues/3736' diff --git a/testing/coreruleset/coreruleset_test.go b/testing/coreruleset/coreruleset_test.go index 3529d35a..cc14cba4 100644 --- a/testing/coreruleset/coreruleset_test.go +++ b/testing/coreruleset/coreruleset_test.go @@ -221,16 +221,13 @@ SecRule REQUEST_HEADERS:X-CRS-Test "@rx ^.*$" \ t.Fatal(err) } + // CRS regression tests are expected to be run with https://github.com/coreruleset/albedo as backend server s := httptest.NewServer(txhttp.WrapHandler(waf, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - // CRS regression tests are expected to be run with https://github.com/coreruleset/albedo as backend server defer r.Body.Close() + // TODO: Investigate why we need to enforce text/plain to have response body tests working. + // Check the Content-Type set by albed and SecResponseBodyMimeType w.Header().Set("Content-Type", "text/plain") - switch { - case r.URL.Path == "/reflect": - albedo.Handler().ServeHTTP(w, r) - default: - // Albedo return 200 with no body - } + albedo.Handler().ServeHTTP(w, r) }))) defer s.Close()