@@ -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 ()
@@ -71,7 +71,7 @@ func fixtureInputModel(mods ...func(model *inputModel)) *inputModel {
7171}
7272
7373func fixtureRequest (mods ... func (request * logs.ApiGetAccessTokenRequest )) logs.ApiGetAccessTokenRequest {
74- request := testClient .GetAccessToken (testCtx , testProjectId , testRegion , testInstanceId , testAccessTokenId )
74+ request := testClient .DefaultAPI . GetAccessToken (testCtx , testProjectId , testRegion , testInstanceId , testAccessTokenId )
7575 for _ , mod := range mods {
7676 mod (& request )
7777 }
@@ -199,7 +199,7 @@ func TestBuildRequest(t *testing.T) {
199199
200200 diff := cmp .Diff (request , tt .expectedRequest ,
201201 cmp .AllowUnexported (tt .expectedRequest ),
202- cmpopts .EquateComparable (testCtx ),
202+ cmpopts .EquateComparable (testCtx , tt . expectedRequest ),
203203 )
204204 if diff != "" {
205205 t .Fatalf ("Data does not match: %s" , diff )
@@ -222,16 +222,16 @@ func TestOutputResult(t *testing.T) {
222222 name : "base" ,
223223 args : args {
224224 accessToken : utils .Ptr (logs.AccessToken {
225- Id : utils . Ptr ( uuid .NewString () ),
226- Permissions : utils . Ptr ([] string {
225+ Id : uuid .NewString (),
226+ Permissions : []logs. PermissionsInner {
227227 "read" ,
228228 "write" ,
229- }) ,
230- DisplayName : utils . Ptr ( "Token" ) ,
229+ },
230+ DisplayName : "Token" ,
231231 AccessToken : utils .Ptr ("Secret access token" ),
232- Creator : utils . Ptr ( uuid .NewString () ),
233- Expires : utils . Ptr ( false ) ,
234- Status : utils . Ptr ( logs .ACCESSTOKENSTATUS_ACTIVE ) ,
232+ Creator : uuid .NewString (),
233+ Expires : false ,
234+ Status : logs .ACCESSTOKENSTATUS_ACTIVE ,
235235 }),
236236 },
237237 wantErr : false ,
0 commit comments