Skip to content

Commit

Permalink
undo some unnecessary test changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rboyer committed Feb 27, 2019
1 parent 721359c commit 4079224
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions agent/consul/acl_endpoint_test.go
Expand Up @@ -645,7 +645,7 @@ func TestACLEndpoint_TokenRead(t *testing.T) {
t.Fatalf("err: %v", err)
}

acl := ACL{s1}
acl := ACL{srv: s1}

t.Run("exists and matches what we created", func(t *testing.T) {
req := structs.ACLTokenGetRequest{
Expand Down Expand Up @@ -766,7 +766,7 @@ func TestACLEndpoint_TokenClone(t *testing.T) {
t1, err := upsertTestToken(codec, "root", "dc1", nil)
require.NoError(t, err)

endpoint := ACL{s1}
endpoint := ACL{srv: s1}

t.Run("normal", func(t *testing.T) {
req := structs.ACLTokenSetRequest{
Expand Down Expand Up @@ -832,7 +832,7 @@ func TestACLEndpoint_TokenSet(t *testing.T) {
clock := newStoppedClock(time.Now())
s1.clock = clock

acl := ACL{s1}
acl := ACL{srv: s1}

var tokenID string

Expand Down Expand Up @@ -1181,7 +1181,7 @@ func TestACLEndpoint_TokenSet_anon(t *testing.T) {
policy, err := upsertTestPolicy(codec, "root", "dc1")
require.NoError(t, err)

acl := ACL{s1}
acl := ACL{srv: s1}

// Assign the policies to a token
tokenUpsertReq := structs.ACLTokenSetRequest{
Expand Down Expand Up @@ -1245,8 +1245,8 @@ func TestACLEndpoint_TokenDelete(t *testing.T) {
s1.clock = clock
s2.clock = clock

acl := ACL{s1}
acl2 := ACL{s2}
acl := ACL{srv: s1}
acl2 := ACL{srv: s2}

existingToken, err := upsertTestToken(codec, "root", "dc1", nil)
require.NoError(t, err)
Expand Down Expand Up @@ -1432,7 +1432,7 @@ func TestACLEndpoint_TokenDelete_anon(t *testing.T) {

testrpc.WaitForLeader(t, s1.RPC, "dc1")

acl := ACL{s1}
acl := ACL{srv: s1}

req := structs.ACLTokenDeleteRequest{
Datacenter: "dc1",
Expand Down Expand Up @@ -1470,7 +1470,7 @@ func TestACLEndpoint_TokenList(t *testing.T) {

expTime := clock.Now().Add(2 * time.Minute)

acl := ACL{s1}
acl := ACL{srv: s1}

t1, err := upsertTestToken(codec, "root", "dc1", nil)
require.NoError(t, err)
Expand Down Expand Up @@ -1560,7 +1560,7 @@ func TestACLEndpoint_TokenBatchRead(t *testing.T) {

expTime := clock.Now().Add(2 * time.Minute)

acl := ACL{s1}
acl := ACL{srv: s1}

t1, err := upsertTestToken(codec, "root", "dc1", nil)
require.NoError(t, err)
Expand Down Expand Up @@ -1639,7 +1639,7 @@ func TestACLEndpoint_PolicyRead(t *testing.T) {
t.Fatalf("err: %v", err)
}

acl := ACL{s1}
acl := ACL{srv: s1}

req := structs.ACLPolicyGetRequest{
Datacenter: "dc1",
Expand Down Expand Up @@ -1717,7 +1717,7 @@ func TestACLEndpoint_PolicySet(t *testing.T) {

testrpc.WaitForLeader(t, s1.RPC, "dc1")

acl := ACL{s1}
acl := ACL{srv: s1}
var policyID string

// Create it
Expand Down Expand Up @@ -1795,7 +1795,7 @@ func TestACLEndpoint_PolicySet_globalManagement(t *testing.T) {

testrpc.WaitForLeader(t, s1.RPC, "dc1")

acl := ACL{s1}
acl := ACL{srv: s1}

// Can't change the rules
{
Expand Down Expand Up @@ -1862,7 +1862,7 @@ func TestACLEndpoint_PolicyDelete(t *testing.T) {
t.Fatalf("err: %v", err)
}

acl := ACL{s1}
acl := ACL{srv: s1}

req := structs.ACLPolicyDeleteRequest{
Datacenter: "dc1",
Expand Down Expand Up @@ -1895,7 +1895,7 @@ func TestACLEndpoint_PolicyDelete_globalManagement(t *testing.T) {

testrpc.WaitForLeader(t, s1.RPC, "dc1")

acl := ACL{s1}
acl := ACL{srv: s1}

req := structs.ACLPolicyDeleteRequest{
Datacenter: "dc1",
Expand Down Expand Up @@ -1930,7 +1930,7 @@ func TestACLEndpoint_PolicyList(t *testing.T) {
p2, err := upsertTestPolicy(codec, "root", "dc1")
require.NoError(t, err)

acl := ACL{s1}
acl := ACL{srv: s1}

req := structs.ACLPolicyListRequest{
Datacenter: "dc1",
Expand Down Expand Up @@ -1976,7 +1976,7 @@ func TestACLEndpoint_PolicyResolve(t *testing.T) {
p2, err := upsertTestPolicy(codec, "root", "dc1")
require.NoError(t, err)

acl := ACL{s1}
acl := ACL{srv: s1}

policies := []string{p1.ID, p2.ID}

Expand Down

0 comments on commit 4079224

Please sign in to comment.