fix flaky test TestACLEndpoint_SecureIntroEndpoints_OnlyCreateLocalData (#6116)

* fix test to write only to dc2 (typo)
* fix retry behavior in existing test (was being used incorrectly)
This commit is contained in:
Sarah Adams 2019-07-12 14:14:42 -07:00 committed by GitHub
parent 4381d42bcd
commit 4afa034d6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -480,14 +480,14 @@ func TestACLEndpoint_GetPolicy(t *testing.T) {
retry.Run(t, func(r *retry.R) {
if err := msgpackrpc.CallWithCodec(codec, "ACL.GetPolicy", &getR, &acls); err != nil {
t.Fatalf("err: %v", err)
r.Fatalf("err: %v", err)
}
if acls.Policy == nil {
t.Fatalf("Bad: %v", acls)
r.Fatalf("Bad: %v", acls)
}
if acls.TTL != 30*time.Second {
t.Fatalf("bad: %v", acls)
r.Fatalf("bad: %v", acls)
}
})
@ -4339,7 +4339,7 @@ func TestACLEndpoint_SecureIntroEndpoints_OnlyCreateLocalData(t *testing.T) {
}
resp := structs.ACLToken{}
require.NoError(t, acl.Login(&req, &resp))
require.NoError(t, acl2.Login(&req, &resp))
remoteToken = &resp
// present in dc2