From 34b271df963b66dc56fa160510aa8b39484fae05 Mon Sep 17 00:00:00 2001 From: Nathanael DEMACON Date: Fri, 28 Apr 2023 16:58:29 +0200 Subject: [PATCH] last test i hope --- internal/core/testing_recorder.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/internal/core/testing_recorder.go b/internal/core/testing_recorder.go index 103c341478..2e1d272c2f 100644 --- a/internal/core/testing_recorder.go +++ b/internal/core/testing_recorder.go @@ -27,7 +27,6 @@ func cassetteResponseFilter(i *cassette.Interaction) error { i.Response.Body = regexp.MustCompile(`"secret_key":"[0-9a-f-]{36}"`).ReplaceAllString(i.Response.Body, `"secret_key":"11111111-1111-1111-1111-111111111111"`) // Buildpacks - i.Request.URL = regexp.MustCompile(`pack\.local%2Fbuilder%2F[0-9a-f]{20}`).ReplaceAllString(i.Request.URL, "pack.local%2Fbuilder%2F11111111111111111111") i.Request.URL = regexp.MustCompile(`pack\.local/builder/[0-9a-f]{20}`).ReplaceAllString(i.Request.URL, "pack.local/builder/11111111111111111111") i.Request.Body = regexp.MustCompile(`pack\.local/builder/[0-9a-f]{20}`).ReplaceAllString(i.Response.Body, "pack.local/builder/11111111111111111111") @@ -43,16 +42,10 @@ const ( func cassetteMatcher(r *http.Request, i cassette.Request) bool { // Docker - if r.URL.Host == windowDockerEngine { + if r.URL.Host == windowDockerEngine || r.URL.Host == "npipe://"+windowDockerEngine { r.URL.Host = unixDockerEngine } - r.URL.Host = regexp.MustCompile(`npipe:////./pipe/docker_engine`).ReplaceAllString(r.URL.Host, "/var/run/docker.sock") - - if r.URL.Scheme == "npipe" { - r.URL.Scheme = "http" - } - r.URL.RawQuery = regexp.MustCompile(`pack\.local%2Fbuilder%2F[0-9a-f]{20}`).ReplaceAllString(r.URL.RawQuery, "pack.local%2Fbuilder%2F11111111111111111111") r.URL.Path = regexp.MustCompile(`pack\.local/builder/[0-9a-f]{20}`).ReplaceAllString(r.URL.Path, "pack.local/builder/11111111111111111111")