Skip to content

Commit db01413

Browse files
committed
move expected value closer to assertion
1 parent 47269fe commit db01413

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

alterclientquotas_test.go

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,6 @@ func TestClientAlterClientQuotas(t *testing.T) {
2424
client, shutdown := newLocalClient()
2525
defer shutdown()
2626

27-
expectedAlterResp := AlterClientQuotasResponse{
28-
Throttle: 0,
29-
Entries: []AlterClientQuotaResponseQuotas{
30-
{
31-
ErrorCode: 0,
32-
Entities: []AlterClientQuotaEntity{
33-
{
34-
EntityName: entityName,
35-
EntityType: entityType,
36-
},
37-
},
38-
},
39-
},
40-
}
41-
4227
alterResp, err := client.AlterClientQuotas(context.Background(), &AlterClientQuotasRequest{
4328
Entries: []AlterClientQuotaEntry{
4429
{
@@ -65,21 +50,15 @@ func TestClientAlterClientQuotas(t *testing.T) {
6550

6651
assert.Equal(t, expectedAlterResp, *alterResp)
6752

68-
expectedDescribeResp := DescribeClientQuotasResponse{
69-
Throttle: 0,
70-
ErrorCode: 0,
71-
Entries: []DescribeClientQuotasResponseQuotas{
53+
expectedAlterResp := AlterClientQuotasResponse{
54+
Throttle: 0,
55+
Entries: []AlterClientQuotaResponseQuotas{
7256
{
73-
Entities: []DescribeClientQuotasEntity{
57+
ErrorCode: 0,
58+
Entities: []AlterClientQuotaEntity{
7459
{
75-
EntityType: entityType,
7660
EntityName: entityName,
77-
},
78-
},
79-
Values: []DescribeClientQuotasValue{
80-
{
81-
Key: key,
82-
Value: value,
61+
EntityType: entityType,
8362
},
8463
},
8564
},
@@ -100,5 +79,26 @@ func TestClientAlterClientQuotas(t *testing.T) {
10079
t.Fatal(err)
10180
}
10281

82+
expectedDescribeResp := DescribeClientQuotasResponse{
83+
Throttle: 0,
84+
ErrorCode: 0,
85+
Entries: []DescribeClientQuotasResponseQuotas{
86+
{
87+
Entities: []DescribeClientQuotasEntity{
88+
{
89+
EntityType: entityType,
90+
EntityName: entityName,
91+
},
92+
},
93+
Values: []DescribeClientQuotasValue{
94+
{
95+
Key: key,
96+
Value: value,
97+
},
98+
},
99+
},
100+
},
101+
}
102+
103103
assert.Equal(t, expectedDescribeResp, *describeResp)
104104
}

0 commit comments

Comments
 (0)