Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
qbiqing committed Aug 3, 2021
1 parent 0f5aff8 commit 9af56f4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 16 deletions.
5 changes: 2 additions & 3 deletions Dockerfile-golang
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM golang:1.12-alpine

# Only install hard dependencies
RUN apk add --no-cache gcc git musl-dev make; \
go get -v -u gotest.tools/gotestsum; \
:
RUN apk add --no-cache gcc git musl-dev make &&
go get -v -u gotest.tools/gotestsum
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ Run locally:
```bash
// run both integration and unit tests
gotestsum -- -tags="integration unit" ./...
// clean testcache
go clean -testcache
```

The tests don't test the nomad deployment capability of the service.
Expand All @@ -136,8 +139,6 @@ The tests don't test the nomad deployment capability of the service.

A makefile to avoid having to change your local docker daemon config so as to run the tests as docker-in-docker for CI integration.

A makefile step to regenerate testing certificates in `testutils/snakeoil`

An interface to swap in the deployment agent (only Nomad supported for now).

Tests take too long to run, this is mainly due each integration test case spinning up and down its own docker containers.
Expand All @@ -147,3 +148,5 @@ Nomad mock server cannot run jobs, which blocks writing of integration tests inv
Buttons should implement debouncing

Bug where only new tags/SHA changes AFTER you toggle back auto deployment will trigger an update, meaning any updates during the window where auto deployment was turned off are moot.

Clean up unused registry methods.
10 changes: 1 addition & 9 deletions client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,9 @@ func TestAutoDeployLatestTag(t *testing.T) {
resolves correctly for autodeployment of custom tags
*/

// set to "test:latest"
// set to "test:alpine"
newTag = "test"
te.UpdatePinnedTag(newTag)

shouldDeploy, _ = te.Clients.ShouldDeploy(te.TestRepoName)
tagToDeploy, _ = te.Clients.GetFormattedPinnedTag(te.TestRepoName)
// should re-deploy after pinned tag is changed
assert.True(t, shouldDeploy)
assert.Equal(t, "test", tagToDeploy)

// "test" is now based on "alpine", rather than the original "latest"
te.PushNewTag(newTag, "alpine")

shouldDeploy, _ = te.Clients.ShouldDeploy(te.TestRepoName)
Expand Down
4 changes: 2 additions & 2 deletions client/dockerhub_api_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ func (api *DockerhubApi) CheckImageIsCurrent(repository, digest string, checkTag
return &isCurrent, nil
}

// We can't just use the registry GetTagDigest because the digests from the
// registry and from the dockerhub API do not match
// Note that the digest returned from the Dockerhub API does not match
// the digest from docker registry manifest V2 API
func (api *DockerhubApi) GetTagDigestFromApi(repository string, checkTag string) (
*string, error) {
endpoint := fmt.Sprintf("/v2/namespaces/%s/repositories/%s/images?", api.namespace,
Expand Down

0 comments on commit 9af56f4

Please sign in to comment.