Skip to content

Commit

Permalink
last test i hope
Browse files Browse the repository at this point in the history
  • Loading branch information
quantumsheep committed May 5, 2023
1 parent 6a0bf08 commit 34b271d
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions internal/core/testing_recorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")

Expand Down

0 comments on commit 34b271d

Please sign in to comment.