Skip to content

Commit

Permalink
added wedding to docker version output
Browse files Browse the repository at this point in the history
  • Loading branch information
damoon committed Nov 16, 2020
1 parent e241091 commit 5e04bea
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
6 changes: 3 additions & 3 deletions hack/sniffer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ func serveReverseProxy(target string, w http.ResponseWriter, r *http.Request) er
}

func printRequest(w io.Writer, r *http.Request) error {
body, err := r.GetBody()
body, err := ioutil.ReadAll(r.Body)
if err != nil {
return fmt.Errorf("create copy of body: %v", err)
return fmt.Errorf("reading body: %v", err)
}

w.Write([]byte(fmt.Sprintf("req: %v\n\n", r)))

r.Body = body
r.Body = ioutil.NopCloser(bytes.NewBuffer(body))

return nil
}
Expand Down
11 changes: 5 additions & 6 deletions pkg/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,19 @@ func version(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(fmt.Sprintf(`{
"Components": [
{
"Name": "Engine",
"Version": "19.03.8",
"Name": "Wedding",
"Details": {
"ApiVersion": "%s",
"Experimental": "false",
"MinAPIVersion": "1.12"
"Scheduler": "kubernetes",
"Builds": "buildkit",
"Pull/Tag/Push": "skopeo"
}
}
],
"Version": "19.03.8",
"ApiVersion": "%s",
"MinAPIVersion": "1.12"
}
`, apiVersion, apiVersion)))
`, apiVersion)))
}

func buildPrune(w http.ResponseWriter, r *http.Request) {
Expand Down
6 changes: 3 additions & 3 deletions tests/Tiltfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@

local_resource ('test docker build',
'time timeout 60 bash docker-build.sh',
'timeout 60 bash docker-build.sh',
deps=['..'],
resource_deps=['wedding'],
allow_parallel=True,
)

local_resource ('test docker pull tag push',
'time timeout 60 bash docker-pull-tag-push.sh',
'timeout 80 bash docker-pull-tag-push.sh',
deps=['..'],
resource_deps=['wedding'],
allow_parallel=True,
)

local_resource ('test tilt ci',
'time timeout 180 bash tilt-ci.sh',
'timeout 170 bash tilt-ci.sh',
deps=['..'],
resource_deps=['wedding'],
allow_parallel=True,
Expand Down

0 comments on commit 5e04bea

Please sign in to comment.