Skip to content
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.

Commit

Permalink
token service on docker hub is down. Skip the tests.
Browse files Browse the repository at this point in the history
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
  • Loading branch information
dongluochen committed Apr 24, 2017
1 parent a92b8f8 commit 74be118
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 19 deletions.
3 changes: 3 additions & 0 deletions discovery/token/token_test.go
Expand Up @@ -25,6 +25,9 @@ func TestInitialize(t *testing.T) {
}

func TestRegister(t *testing.T) {
// Docker hub token service is down. Skip this test.
t.Skip("docker hub token service is down")

d := &Discovery{token: "TEST_TOKEN", url: discoveryURL, heartbeat: 1}
expected := "127.0.0.1:2675"
expectedEntries, err := discovery.CreateEntries([]string{expected})
Expand Down
46 changes: 27 additions & 19 deletions test/integration/discovery/token.bats
Expand Up @@ -5,26 +5,30 @@ load discovery_helpers
TOKEN=""
DISCOVERY=""

function token_cleanup() {
[ -z "$TOKEN" ] && return
echo "Removing $TOKEN"
curl -X DELETE "https://discovery.hub.docker.com/v1/clusters/$TOKEN"
}

function setup() {
TOKEN=$(swarm create)
[[ "$TOKEN" =~ ^[0-9a-f]{32}$ ]]
DISCOVERY="token://$TOKEN"
}

function teardown() {
swarm_manage_cleanup
swarm_join_cleanup
stop_docker
token_cleanup
}

#function token_cleanup() {
# [ -z "$TOKEN" ] && return
# echo "Removing $TOKEN"
# curl -X DELETE "https://discovery.hub.docker.com/v1/clusters/$TOKEN"
#}

#function setup() {
# TOKEN=$(swarm create)
# [[ "$TOKEN" =~ ^[0-9a-f]{32}$ ]]
# DISCOVERY="token://$TOKEN"
#}

#function teardown() {
# swarm_manage_cleanup
# swarm_join_cleanup
# stop_docker
# token_cleanup
#}

# docker hub token service is down. This is not the recommended way of
# discovery. It's not prioritized on Docker hub. Disable the test for now.
@test "token discovery: recover engines" {
skip

# The goal of this test is to ensure swarm can see engines that joined
# while the manager was stopped.

Expand All @@ -38,7 +42,11 @@ function teardown() {
retry 5 1 discovery_check_swarm_info
}

# docker hub token service is down. Since this is not the recommended way of
# discovery. It's not prioritized on Docker hub. Disable the test for now.
@test "token discovery: watch for changes" {
skip

# The goal of this test is to ensure swarm can see new nodes as they join
# the cluster.

Expand Down

0 comments on commit 74be118

Please sign in to comment.