From 990f0ea4c02d6f0dfddd8a6d5b70d9a9157291d9 Mon Sep 17 00:00:00 2001 From: Josh Dolitsky Date: Tue, 9 Mar 2021 14:04:28 -0500 Subject: [PATCH 1/7] Modify conformance tests for single-shot uploads Signed-off-by: Josh Dolitsky --- .github/workflows/release.yml | 2 +- conformance/02_push_test.go | 15 ++++-- conformance/go.mod | 12 ++--- conformance/go.sum | 87 +++++++++++++++++++++++++++-------- conformance/setup.go | 20 ++++++++ 5 files changed, 105 insertions(+), 31 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f1459cde..f9b9ff35 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: - name: setup go environment uses: actions/setup-go@v1 with: - go-version: '1.15.6' + go-version: '1.16.0' - name: Prepare id: prepare run: | diff --git a/conformance/02_push_test.go b/conformance/02_push_test.go index 6e32478f..827454a9 100644 --- a/conformance/02_push_test.go +++ b/conformance/02_push_test.go @@ -60,7 +60,7 @@ var test02Push = func() { Expect(resp.StatusCode()).To(Equal(http.StatusNotFound)) }) - g.Specify("POST request with digest and blob should yield a 201", func() { + g.Specify("POST request with digest and blob should yield a 201 or 202", func() { SkipIfDisabled(push) req := client.NewRequest(reggie.POST, "/v2//blobs/uploads/"). SetHeader("Content-Length", configBlobContentLength). @@ -71,15 +71,22 @@ var test02Push = func() { Expect(err).To(BeNil()) location := resp.Header().Get("Location") Expect(location).ToNot(BeEmpty()) - Expect(resp.StatusCode()).To(Equal(http.StatusCreated)) + Expect(resp.StatusCode()).To(SatisfyAny( + Equal(http.StatusCreated), + Equal(http.StatusAccepted), + )) }) - g.Specify("GET request to blob URL from prior request should yield 200", func() { + g.Specify("GET request to blob URL from prior request should yield 200 or 404 based on response code", func() { SkipIfDisabled(push) req := client.NewRequest(reggie.GET, "/v2//blobs/", reggie.WithDigest(configBlobDigest)) resp, err := client.Do(req) Expect(err).To(BeNil()) - Expect(resp.StatusCode()).To(Equal(http.StatusOK)) + if lastResponse.StatusCode() == http.StatusAccepted { + Expect(resp.StatusCode()).To(Equal(http.StatusNotFound)) + } else { + Expect(resp.StatusCode()).To(Equal(http.StatusOK)) + } }) g.Specify("POST request should yield a session ID", func() { diff --git a/conformance/go.mod b/conformance/go.mod index fc9e6f49..51fbfc1d 100644 --- a/conformance/go.mod +++ b/conformance/go.mod @@ -1,12 +1,12 @@ module github.com/opencontainers/distribution-spec/conformance -go 1.13 +go 1.16 require ( - github.com/bloodorangeio/reggie v0.4.0 - github.com/google/uuid v1.1.2 - github.com/onsi/ginkgo v1.11.0 - github.com/onsi/gomega v1.8.1 - github.com/opencontainers/go-digest v1.0.0-rc1 + github.com/bloodorangeio/reggie v0.5.0 + github.com/google/uuid v1.2.0 + github.com/onsi/ginkgo v1.15.1 + github.com/onsi/gomega v1.11.0 + github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.0.1 ) diff --git a/conformance/go.sum b/conformance/go.sum index 219e7bc6..cca2d41d 100644 --- a/conformance/go.sum +++ b/conformance/go.sum @@ -1,46 +1,93 @@ -github.com/bloodorangeio/reggie v0.4.0 h1:x4Y4gsC9qcFcQASEwME3frs9bWAHGb3EfsRWwdnwxSg= -github.com/bloodorangeio/reggie v0.4.0/go.mod h1:u7HqihAZy812d6ysiuDawpHJYtpGSNL2E/4Cyu/mtZg= -github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +github.com/bloodorangeio/reggie v0.5.0 h1:TZzqCxav8qzZCVwRDW8AQHXI3+GgVQFlYBvKJps0uQo= +github.com/bloodorangeio/reggie v0.5.0/go.mod h1:u7HqihAZy812d6ysiuDawpHJYtpGSNL2E/4Cyu/mtZg= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/go-resty/resty/v2 v2.1.0 h1:Z6IefCpUMfnvItVJaJXWv/pMiiD11So35QgwEELsldE= github.com/go-resty/resty/v2 v2.1.0/go.mod h1:dZGr0i9PLlaaTD4H/hoZIDjQ+r6xq8mgbRzHZf7f2J8= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= -github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.8.1 h1:C5Dqfs/LeauYDX0jJXIe2SWmwCbGzx9yF8C8xy3Lh34= -github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.15.1 h1:DsXNrKujDlkMS9Rsxmd+Fg7S6Kc5lhE+qX8tY6laOxc= +github.com/onsi/ginkgo v1.15.1/go.mod h1:Dd6YFfwBW84ETqqtL0CPyPXillHgY6XhQH3uuCCTr/o= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.11.0 h1:+CqWgvj0OZycCaqclBD1pxKHAU+tOkHmQIWvDHq2aug= +github.com/onsi/gomega v1.11.0/go.mod h1:azGKhqFUon9Vuj0YmTfLSmx0FUwqXYSTl5re8lQLTUg= github.com/opencontainers/distribution-spec v1.0.0-rc0.0.20200108182153-219f20cbcfa1 h1:QMs7PvjIHfWNHJFgY2BTMSDBV14dHRqb82L2BvjO8w0= github.com/opencontainers/distribution-spec v1.0.0-rc0.0.20200108182153-219f20cbcfa1/go.mod h1:copR2flp+jTEvQIFMb6MIx45OkrxzqyjszPDT3hx/5Q= -github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ= -github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7 h1:rTIdg5QFRR7XCaK4LCjBiPbx8j4DQRpdYMnGn/bJUEU= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb h1:eBmm0M9fYhWpKZLjQUUKka/LtIxf46G4fxeEz5KJr9U= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091 h1:DMyOG0U+gKfu8JZzg2UQe9MeaC1X+xQWlAKcRnjxjCw= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= diff --git a/conformance/setup.go b/conformance/setup.go index 2e76c771..94d73dca 100644 --- a/conformance/setup.go +++ b/conformance/setup.go @@ -2,10 +2,12 @@ package conformance import ( "bytes" + "crypto/rand" "encoding/base64" "encoding/json" "fmt" "log" + "math/big" "os" "strconv" @@ -167,6 +169,9 @@ func init() { client.SetLogger(logger) client.SetCookieJar(nil) + // in order to get a unique blob digest, we create a new author + // field for the config on each run + randomAuthor := randomString(16) config := imagespec.Image{ Architecture: "amd64", OS: "linux", @@ -174,6 +179,7 @@ func init() { Type: "layers", DiffIDs: []godigest.Digest{}, }, + Author: randomAuthor, } configBlobContent, err = json.MarshalIndent(&config, "", "\t") if err != nil { @@ -358,3 +364,17 @@ func getTagNameFromResponse(lastResponse *reggie.Response) (tagName string) { return } + +// Adapted from https://gist.github.com/dopey/c69559607800d2f2f90b1b1ed4e550fb +func randomString(n int) string { + const letters = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-" + ret := make([]byte, n) + for i := 0; i < n; i++ { + num, err := rand.Int(rand.Reader, big.NewInt(int64(len(letters)))) + if err != nil { + panic(err) + } + ret[i] = letters[num.Int64()] + } + return string(ret) +} From 482a131b4578d62ea22a99420665eb68e76f4bdf Mon Sep 17 00:00:00 2001 From: Josh Dolitsky Date: Tue, 9 Mar 2021 14:37:35 -0500 Subject: [PATCH 2/7] Fix unset lastResponse variable Signed-off-by: Josh Dolitsky --- conformance/02_push_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/conformance/02_push_test.go b/conformance/02_push_test.go index 827454a9..9ed61f4c 100644 --- a/conformance/02_push_test.go +++ b/conformance/02_push_test.go @@ -75,6 +75,7 @@ var test02Push = func() { Equal(http.StatusCreated), Equal(http.StatusAccepted), )) + lastResponse = resp }) g.Specify("GET request to blob URL from prior request should yield 200 or 404 based on response code", func() { From b9bf49b010e2bed82a76bc519fca8a242d905261 Mon Sep 17 00:00:00 2001 From: Josh Dolitsky Date: Tue, 9 Mar 2021 16:13:40 -0500 Subject: [PATCH 3/7] allow ability to skip single-shot upload test Signed-off-by: Josh Dolitsky --- conformance/02_push_test.go | 2 ++ conformance/README.md | 9 ++++++++- conformance/setup.go | 4 ++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/conformance/02_push_test.go b/conformance/02_push_test.go index 9ed61f4c..172c0624 100644 --- a/conformance/02_push_test.go +++ b/conformance/02_push_test.go @@ -62,6 +62,7 @@ var test02Push = func() { g.Specify("POST request with digest and blob should yield a 201 or 202", func() { SkipIfDisabled(push) + RunOnlyIfNot(skipSingleShotUploadTest) req := client.NewRequest(reggie.POST, "/v2//blobs/uploads/"). SetHeader("Content-Length", configBlobContentLength). SetHeader("Content-Type", "application/octet-stream"). @@ -80,6 +81,7 @@ var test02Push = func() { g.Specify("GET request to blob URL from prior request should yield 200 or 404 based on response code", func() { SkipIfDisabled(push) + RunOnlyIfNot(skipSingleShotUploadTest) req := client.NewRequest(reggie.GET, "/v2//blobs/", reggie.WithDigest(configBlobDigest)) resp, err := client.Do(req) Expect(err).To(BeNil()) diff --git a/conformance/README.md b/conformance/README.md index e3d7bd78..f32649e4 100644 --- a/conformance/README.md +++ b/conformance/README.md @@ -102,10 +102,17 @@ and another with no layers. If the empty-layer test is causing a failure, it can environment: ``` -# Enable layer upload OCI_SKIP_EMPTY_LAYER_PUSH_TEST=1 ``` +Some registries support pushing blobs with a single POST request; however, this behaviour is not strictly required. +If you wish to disable the single POST test (a.k.a. the "single shot upload"), it can be skipped by setting the +following in the environment: + +``` +OCI_SKIP_SINGLE_SHOT_UPLOAD_TEST=1 +``` + The test suite will need access to a second namespace. This namespace is used to check support for cross-repository mounting of blobs, and may need to be configured on the server-side in advance. It is specified by setting the following in the environment: diff --git a/conformance/setup.go b/conformance/setup.go index 94d73dca..bde50562 100644 --- a/conformance/setup.go +++ b/conformance/setup.go @@ -57,6 +57,7 @@ const ( envVarContentDiscovery = "OCI_TEST_CONTENT_DISCOVERY" envVarContentManagement = "OCI_TEST_CONTENT_MANAGEMENT" envVarPushEmptyLayer = "OCI_SKIP_EMPTY_LAYER_PUSH_TEST" + envVarSingleShotUpload = "OCI_SKIP_SINGLE_SHOT_UPLOAD_TEST" envVarBlobDigest = "OCI_BLOB_DIGEST" envVarManifestDigest = "OCI_MANIFEST_DIGEST" envVarEmptyLayerManifestDigest = "OCI_EMPTY_LAYER_MANIFEST_DIGEST" @@ -129,6 +130,7 @@ var ( runContentDiscoverySetup bool runContentManagementSetup bool skipEmptyLayerTest bool + skipSingleShotUploadTest bool deleteManifestBeforeBlobs bool Version = "unknown" ) @@ -289,6 +291,7 @@ func init() { runContentDiscoverySetup = true runContentManagementSetup = true skipEmptyLayerTest = false + skipSingleShotUploadTest = false deleteManifestBeforeBlobs = false if os.Getenv(envVarTagName) != "" && @@ -302,6 +305,7 @@ func init() { } skipEmptyLayerTest, _ = strconv.ParseBool(os.Getenv(envVarPushEmptyLayer)) + skipSingleShotUploadTest, _ = strconv.ParseBool(os.Getenv(envVarSingleShotUpload)) deleteManifestBeforeBlobs, _ = strconv.ParseBool(os.Getenv(envVarDeleteManifestBeforeBlobs)) reportJUnitFilename = "junit.xml" From 1659f70c511b8c6bf305422c93a871a240267aa5 Mon Sep 17 00:00:00 2001 From: Josh Dolitsky Date: Tue, 9 Mar 2021 17:07:32 -0500 Subject: [PATCH 4/7] Revert "allow ability to skip single-shot upload test" This reverts commit b9bf49b010e2bed82a76bc519fca8a242d905261. Signed-off-by: Josh Dolitsky --- conformance/02_push_test.go | 2 -- conformance/README.md | 9 +-------- conformance/setup.go | 4 ---- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/conformance/02_push_test.go b/conformance/02_push_test.go index 172c0624..9ed61f4c 100644 --- a/conformance/02_push_test.go +++ b/conformance/02_push_test.go @@ -62,7 +62,6 @@ var test02Push = func() { g.Specify("POST request with digest and blob should yield a 201 or 202", func() { SkipIfDisabled(push) - RunOnlyIfNot(skipSingleShotUploadTest) req := client.NewRequest(reggie.POST, "/v2//blobs/uploads/"). SetHeader("Content-Length", configBlobContentLength). SetHeader("Content-Type", "application/octet-stream"). @@ -81,7 +80,6 @@ var test02Push = func() { g.Specify("GET request to blob URL from prior request should yield 200 or 404 based on response code", func() { SkipIfDisabled(push) - RunOnlyIfNot(skipSingleShotUploadTest) req := client.NewRequest(reggie.GET, "/v2//blobs/", reggie.WithDigest(configBlobDigest)) resp, err := client.Do(req) Expect(err).To(BeNil()) diff --git a/conformance/README.md b/conformance/README.md index f32649e4..e3d7bd78 100644 --- a/conformance/README.md +++ b/conformance/README.md @@ -102,17 +102,10 @@ and another with no layers. If the empty-layer test is causing a failure, it can environment: ``` +# Enable layer upload OCI_SKIP_EMPTY_LAYER_PUSH_TEST=1 ``` -Some registries support pushing blobs with a single POST request; however, this behaviour is not strictly required. -If you wish to disable the single POST test (a.k.a. the "single shot upload"), it can be skipped by setting the -following in the environment: - -``` -OCI_SKIP_SINGLE_SHOT_UPLOAD_TEST=1 -``` - The test suite will need access to a second namespace. This namespace is used to check support for cross-repository mounting of blobs, and may need to be configured on the server-side in advance. It is specified by setting the following in the environment: diff --git a/conformance/setup.go b/conformance/setup.go index bde50562..94d73dca 100644 --- a/conformance/setup.go +++ b/conformance/setup.go @@ -57,7 +57,6 @@ const ( envVarContentDiscovery = "OCI_TEST_CONTENT_DISCOVERY" envVarContentManagement = "OCI_TEST_CONTENT_MANAGEMENT" envVarPushEmptyLayer = "OCI_SKIP_EMPTY_LAYER_PUSH_TEST" - envVarSingleShotUpload = "OCI_SKIP_SINGLE_SHOT_UPLOAD_TEST" envVarBlobDigest = "OCI_BLOB_DIGEST" envVarManifestDigest = "OCI_MANIFEST_DIGEST" envVarEmptyLayerManifestDigest = "OCI_EMPTY_LAYER_MANIFEST_DIGEST" @@ -130,7 +129,6 @@ var ( runContentDiscoverySetup bool runContentManagementSetup bool skipEmptyLayerTest bool - skipSingleShotUploadTest bool deleteManifestBeforeBlobs bool Version = "unknown" ) @@ -291,7 +289,6 @@ func init() { runContentDiscoverySetup = true runContentManagementSetup = true skipEmptyLayerTest = false - skipSingleShotUploadTest = false deleteManifestBeforeBlobs = false if os.Getenv(envVarTagName) != "" && @@ -305,7 +302,6 @@ func init() { } skipEmptyLayerTest, _ = strconv.ParseBool(os.Getenv(envVarPushEmptyLayer)) - skipSingleShotUploadTest, _ = strconv.ParseBool(os.Getenv(envVarSingleShotUpload)) deleteManifestBeforeBlobs, _ = strconv.ParseBool(os.Getenv(envVarDeleteManifestBeforeBlobs)) reportJUnitFilename = "junit.xml" From 5a66869eb3db4ff36a0d407786a9d49487a92354 Mon Sep 17 00:00:00 2001 From: Josh Dolitsky Date: Tue, 23 Mar 2021 11:19:29 -0400 Subject: [PATCH 5/7] update dependencies Signed-off-by: Josh Dolitsky --- .github/workflows/release.yml | 2 +- conformance/go.mod | 2 +- conformance/go.sum | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 687b7555..9e391c1d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: - name: setup go environment uses: actions/setup-go@v1 with: - go-version: '1.16.0' + go-version: '1.16.2' - name: Prepare id: prepare run: | diff --git a/conformance/go.mod b/conformance/go.mod index 51fbfc1d..084559ae 100644 --- a/conformance/go.mod +++ b/conformance/go.mod @@ -5,7 +5,7 @@ go 1.16 require ( github.com/bloodorangeio/reggie v0.5.0 github.com/google/uuid v1.2.0 - github.com/onsi/ginkgo v1.15.1 + github.com/onsi/ginkgo v1.15.2 github.com/onsi/gomega v1.11.0 github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.0.1 diff --git a/conformance/go.sum b/conformance/go.sum index cca2d41d..00365e61 100644 --- a/conformance/go.sum +++ b/conformance/go.sum @@ -27,8 +27,8 @@ github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.15.1 h1:DsXNrKujDlkMS9Rsxmd+Fg7S6Kc5lhE+qX8tY6laOxc= -github.com/onsi/ginkgo v1.15.1/go.mod h1:Dd6YFfwBW84ETqqtL0CPyPXillHgY6XhQH3uuCCTr/o= +github.com/onsi/ginkgo v1.15.2 h1:l77YT15o814C2qVL47NOyjV/6RbaP7kKdrvZnxQ3Org= +github.com/onsi/ginkgo v1.15.2/go.mod h1:Dd6YFfwBW84ETqqtL0CPyPXillHgY6XhQH3uuCCTr/o= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.11.0 h1:+CqWgvj0OZycCaqclBD1pxKHAU+tOkHmQIWvDHq2aug= From bc2b0f2ed679820122f91744b13ad6a8bc14a510 Mon Sep 17 00:00:00 2001 From: Josh Dolitsky Date: Tue, 23 Mar 2021 11:49:32 -0400 Subject: [PATCH 6/7] pin to gomega 1.10.4 due to test issues Signed-off-by: Josh Dolitsky --- conformance/go.mod | 2 +- conformance/go.sum | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/conformance/go.mod b/conformance/go.mod index 084559ae..46ed87e7 100644 --- a/conformance/go.mod +++ b/conformance/go.mod @@ -6,7 +6,7 @@ require ( github.com/bloodorangeio/reggie v0.5.0 github.com/google/uuid v1.2.0 github.com/onsi/ginkgo v1.15.2 - github.com/onsi/gomega v1.11.0 + github.com/onsi/gomega v1.10.4 github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.0.1 ) diff --git a/conformance/go.sum b/conformance/go.sum index 00365e61..c6ec53cf 100644 --- a/conformance/go.sum +++ b/conformance/go.sum @@ -11,9 +11,8 @@ github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:x github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -31,8 +30,8 @@ github.com/onsi/ginkgo v1.15.2 h1:l77YT15o814C2qVL47NOyjV/6RbaP7kKdrvZnxQ3Org= github.com/onsi/ginkgo v1.15.2/go.mod h1:Dd6YFfwBW84ETqqtL0CPyPXillHgY6XhQH3uuCCTr/o= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.11.0 h1:+CqWgvj0OZycCaqclBD1pxKHAU+tOkHmQIWvDHq2aug= -github.com/onsi/gomega v1.11.0/go.mod h1:azGKhqFUon9Vuj0YmTfLSmx0FUwqXYSTl5re8lQLTUg= +github.com/onsi/gomega v1.10.4 h1:NiTx7EEvBzu9sFOD1zORteLSt3o8gnlvZZwSE9TnY9U= +github.com/onsi/gomega v1.10.4/go.mod h1:g/HbgYopi++010VEqkFgJHKC09uJiW9UkXvMUuKHUCQ= github.com/opencontainers/distribution-spec v1.0.0-rc0.0.20200108182153-219f20cbcfa1 h1:QMs7PvjIHfWNHJFgY2BTMSDBV14dHRqb82L2BvjO8w0= github.com/opencontainers/distribution-spec v1.0.0-rc0.0.20200108182153-219f20cbcfa1/go.mod h1:copR2flp+jTEvQIFMb6MIx45OkrxzqyjszPDT3hx/5Q= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -74,6 +73,7 @@ golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4f golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -88,6 +88,5 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= From ec32174d3ffa6fcf6cf95eaa8423f2641bd505ab Mon Sep 17 00:00:00 2001 From: Josh Dolitsky Date: Tue, 23 Mar 2021 12:06:11 -0400 Subject: [PATCH 7/7] Upgrade golangci-lint version, remove unused code Signed-off-by: Josh Dolitsky --- Makefile | 5 ++--- conformance/go.mod | 2 +- conformance/go.sum | 11 ++++++----- conformance/reporter.go | 1 - conformance/setup.go | 7 ------- 5 files changed, 9 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index be463b72..c33d07e5 100644 --- a/Makefile +++ b/Makefile @@ -24,9 +24,7 @@ ifeq "$(strip $(PANDOC))" '' endif endif -# Using older version of golangci-lint -# see https://github.com/golangci/golangci-lint/issues/825#issuecomment-553210121 -GOLANGCILINT_CONTAINER ?= docker.io/golangci/golangci-lint:v1.17.1 +GOLANGCILINT_CONTAINER ?= docker.io/golangci/golangci-lint:v1.38.0 ifeq "$(strip $(GOLANGCILINT))" '' ifneq "$(strip $(DOCKER))" '' GOLANGCILINT = $(DOCKER) run \ @@ -35,6 +33,7 @@ ifeq "$(strip $(GOLANGCILINT))" '' -v $(shell pwd)/:/input:ro \ -e GOCACHE=/tmp/.cache \ -e GO111MODULE=on \ + -e GOLANGCI_LINT_CACHE=/tmp/.cache \ --entrypoint /bin/bash \ -u $(shell id -u) \ --workdir /input \ diff --git a/conformance/go.mod b/conformance/go.mod index 46ed87e7..084559ae 100644 --- a/conformance/go.mod +++ b/conformance/go.mod @@ -6,7 +6,7 @@ require ( github.com/bloodorangeio/reggie v0.5.0 github.com/google/uuid v1.2.0 github.com/onsi/ginkgo v1.15.2 - github.com/onsi/gomega v1.10.4 + github.com/onsi/gomega v1.11.0 github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.0.1 ) diff --git a/conformance/go.sum b/conformance/go.sum index c6ec53cf..00365e61 100644 --- a/conformance/go.sum +++ b/conformance/go.sum @@ -11,8 +11,9 @@ github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:x github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -30,8 +31,8 @@ github.com/onsi/ginkgo v1.15.2 h1:l77YT15o814C2qVL47NOyjV/6RbaP7kKdrvZnxQ3Org= github.com/onsi/ginkgo v1.15.2/go.mod h1:Dd6YFfwBW84ETqqtL0CPyPXillHgY6XhQH3uuCCTr/o= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.10.4 h1:NiTx7EEvBzu9sFOD1zORteLSt3o8gnlvZZwSE9TnY9U= -github.com/onsi/gomega v1.10.4/go.mod h1:g/HbgYopi++010VEqkFgJHKC09uJiW9UkXvMUuKHUCQ= +github.com/onsi/gomega v1.11.0 h1:+CqWgvj0OZycCaqclBD1pxKHAU+tOkHmQIWvDHq2aug= +github.com/onsi/gomega v1.11.0/go.mod h1:azGKhqFUon9Vuj0YmTfLSmx0FUwqXYSTl5re8lQLTUg= github.com/opencontainers/distribution-spec v1.0.0-rc0.0.20200108182153-219f20cbcfa1 h1:QMs7PvjIHfWNHJFgY2BTMSDBV14dHRqb82L2BvjO8w0= github.com/opencontainers/distribution-spec v1.0.0-rc0.0.20200108182153-219f20cbcfa1/go.mod h1:copR2flp+jTEvQIFMb6MIx45OkrxzqyjszPDT3hx/5Q= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -73,7 +74,6 @@ golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4f golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -88,5 +88,6 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= diff --git a/conformance/reporter.go b/conformance/reporter.go index 9747cf7a..450db4ab 100644 --- a/conformance/reporter.go +++ b/conformance/reporter.go @@ -576,7 +576,6 @@ func (reporter *HTMLReporter) SpecSuiteWillBegin(config config.GinkgoConfigType, envVarPushEmptyLayer, envVarBlobDigest, envVarManifestDigest, - envVarEmptyLayerManifestDigest, envVarTagName, envVarTagList, envVarHideSkippedWorkflows, diff --git a/conformance/setup.go b/conformance/setup.go index a710a122..e4a55d24 100644 --- a/conformance/setup.go +++ b/conformance/setup.go @@ -65,7 +65,6 @@ const ( envVarPushEmptyLayer = "OCI_SKIP_EMPTY_LAYER_PUSH_TEST" envVarBlobDigest = "OCI_BLOB_DIGEST" envVarManifestDigest = "OCI_MANIFEST_DIGEST" - envVarEmptyLayerManifestDigest = "OCI_EMPTY_LAYER_MANIFEST_DIGEST" envVarTagName = "OCI_TAG_NAME" envVarTagList = "OCI_TAG_LIST" envVarHideSkippedWorkflows = "OCI_HIDE_SKIPPED_WORKFLOWS" @@ -117,7 +116,6 @@ var ( layerBlobData []byte layerBlobDigest string layerBlobContentLength string - emptyLayerManifestDigest string emptyLayerManifestContent []byte nonexistentManifest string reportJUnitFilename string @@ -267,11 +265,6 @@ func init() { log.Fatal(err) } - emptyLayerManifestDigest = godigest.FromBytes(emptyLayerManifestContent).String() - if v := os.Getenv(envVarEmptyLayerManifestDigest); v != "" { - emptyLayerManifestDigest = v - } - nonexistentManifest = ".INVALID_MANIFEST_NAME" invalidManifestContent = []byte("blablabla")