1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Fix TestSecretCreateWithLabels nondeterminism

This test checks for the substring "foo" in the "secret ls" output. This
is a valid base36 substring and can sometimes show up by chance:

    docker_cli_secret_create_test.go:86:
        c.Assert(out, checker.Not(checker.Contains), name)
    ... obtained string = "" +
    ...     "ID                          NAME                        CREATED UPDATED\n" +
    ...     "ob8y4t4feuz8pn5h6vla9oxoz   stefoo7e268ozqfupi9s4se9q   Less than a second ago   Less than a second ago\n"
    ... substring string = "foo"

Change the secret name to test_secret, matching other tests. Underscores
can't appear in base36 so this name is safe to grep for.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This commit is contained in:
Aaron Lehmann 2017-01-05 15:22:51 -08:00
parent 1b2786c2c2
commit 45833ce54d

View file

@ -55,7 +55,7 @@ func (s *DockerSwarmSuite) TestSecretCreateWithLabels(c *check.C) {
func (s *DockerSwarmSuite) TestSecretCreateResolve(c *check.C) {
d := s.AddDaemon(c, true, true)
name := "foo"
name := "test_secret"
id := d.CreateSecret(c, swarm.SecretSpec{
swarm.Annotations{
Name: name,