@@ -23,7 +23,7 @@ type testCtxKey struct{}
2323
2424var (
2525 testCtx = context .WithValue (context .Background (), testCtxKey {}, "foo" )
26- testClient = & logs.APIClient {}
26+ testClient = & logs.APIClient {DefaultAPI : & logs. DefaultAPIService {} }
2727
2828 testProjectId = uuid .NewString ()
2929 testInstanceId = uuid .NewString ()
@@ -61,7 +61,7 @@ func fixtureInputModel(mods ...func(model *inputModel)) *inputModel {
6161}
6262
6363func fixtureRequest (mods ... func (request * logs.ApiListAccessTokensRequest )) logs.ApiListAccessTokensRequest {
64- request := testClient .ListAccessTokens (testCtx , testProjectId , testRegion , testInstanceId )
64+ request := testClient .DefaultAPI . ListAccessTokens (testCtx , testProjectId , testRegion , testInstanceId )
6565 for _ , mod := range mods {
6666 mod (& request )
6767 }
@@ -171,7 +171,7 @@ func TestBuildRequest(t *testing.T) {
171171
172172 diff := cmp .Diff (request , tt .expectedRequest ,
173173 cmp .AllowUnexported (tt .expectedRequest ),
174- cmpopts .EquateComparable (testCtx ),
174+ cmpopts .EquateComparable (testCtx , tt . expectedRequest ),
175175 )
176176 if diff != "" {
177177 t .Fatalf ("Data does not match: %s" , diff )
@@ -196,16 +196,16 @@ func TestOutputResult(t *testing.T) {
196196 args : args {
197197 accessTokens : []logs.AccessToken {
198198 {
199- Id : utils . Ptr ( uuid .NewString () ),
200- Permissions : utils . Ptr ([] string {
199+ Id : uuid .NewString (),
200+ Permissions : []logs. PermissionsInner {
201201 "read" ,
202202 "write" ,
203- }) ,
204- DisplayName : utils . Ptr ( "Token" ) ,
203+ },
204+ DisplayName : "Token" ,
205205 AccessToken : utils .Ptr ("Secret access token" ),
206- Creator : utils . Ptr ( uuid .NewString () ),
207- Expires : utils . Ptr ( false ) ,
208- Status : utils . Ptr ( logs .ACCESSTOKENSTATUS_ACTIVE ) ,
206+ Creator : uuid .NewString (),
207+ Expires : false ,
208+ Status : logs .ACCESSTOKENSTATUS_ACTIVE ,
209209 },
210210 },
211211 },
0 commit comments