Skip to content
Permalink
Browse files

(e2e): Apply requested changes in the #309

  • Loading branch information
erbesharat committed Dec 23, 2019
1 parent a3bb133 commit d02a2cbc00a3f8c81e082e5a9122bae64df53b7e
Showing with 5 additions and 12 deletions.
  1. +1 −1 Makefile
  2. +1 −1 e2e/Dockerfile
  3. +3 −10 e2e/dockerv2/main.go
@@ -36,7 +36,7 @@ endtoend-test: docker-build
docker build -t $(IMAGE)-dirty .
cd e2e && \
docker build -t c.txtdirect.org/tester:dirty . && \
docker run -d -p 5000:5000 --name registry registry:2 && \
docker run -d -p 5000:5000 --name registry registry:2.7.1 && \
VERSION=$(VERSION)-dirty go run main.go

version:
@@ -4,6 +4,6 @@ RUN apk --no-cache add git

WORKDIR /e2e

RUN GO111MODULE=on go get -u github.com/google/go-containerregistry/cmd/crane
RUN GO111MODULE=on go get -u github.com/google/go-containerregistry/cmd/crane@34fb8ff

CMD [ "go" ]
@@ -14,21 +14,14 @@ type data struct {
image string
}

type Kind string

const (
Pull Kind = "pull"
Push Kind = "push"
)

type test struct {
name string
args data
expected string
referer bool
status int
headers http.Header
kind Kind
kind string
fallback bool
}

@@ -62,7 +55,7 @@ var tests = []test{
args: data{
image: "pull.dockerv2.dockerv2.example.com/txtdirect",
},
kind: Pull,
kind: "pull",
},
}

@@ -76,7 +69,7 @@ func main() {
}

switch test.kind {
case Pull:
case "pull":
_, err := exec.Command("crane", "pull", "-i", test.args.image, "txtdirect_e2e").CombinedOutput()
if err != nil {
result[false] = append(result[false], test)

0 comments on commit d02a2cb

Please sign in to comment.
You can’t perform that action at this time.