@@ -33,7 +33,7 @@ func TestService(t *testing.T) {
3333 }))
3434 defer ts .Close ()
3535
36- cfg := client .NewMgcClient ("test-api-key" ,
36+ cfg := client .NewMgcClient (client . WithAPIKey ( "test-api-key" ) ,
3737 client .WithTimeout (20 * time .Second ),
3838 )
3939 c := New (cfg , WithGlobalBasePath (client .MgcUrl (ts .URL )))
@@ -69,7 +69,7 @@ func TestService(t *testing.T) {
6969 }))
7070 defer ts .Close ()
7171
72- cfg := client .NewMgcClient ("test-api-key" ,
72+ cfg := client .NewMgcClient (client . WithAPIKey ( "test-api-key" ) ,
7373 client .WithTimeout (20 * time .Second ),
7474 )
7575 c := New (cfg , WithGlobalBasePath (client .MgcUrl (ts .URL )))
@@ -111,7 +111,7 @@ func TestService(t *testing.T) {
111111 }))
112112 defer ts .Close ()
113113
114- cfg := client .NewMgcClient ("test-api-key" ,
114+ cfg := client .NewMgcClient (client . WithAPIKey ( "test-api-key" ) ,
115115 client .WithTimeout (20 * time .Second ),
116116 )
117117 c := New (cfg , WithGlobalBasePath (client .MgcUrl (ts .URL )))
@@ -150,7 +150,7 @@ func TestService(t *testing.T) {
150150 }))
151151 defer ts .Close ()
152152
153- cfg := client .NewMgcClient ("test-api-key" ,
153+ cfg := client .NewMgcClient (client . WithAPIKey ( "test-api-key" ) ,
154154 client .WithTimeout (20 * time .Second ),
155155 )
156156 c := New (cfg , WithGlobalBasePath (client .MgcUrl (ts .URL )))
@@ -172,7 +172,7 @@ func TestService(t *testing.T) {
172172 }))
173173 defer ts .Close ()
174174
175- cfg := client .NewMgcClient ("test-api-key" ,
175+ cfg := client .NewMgcClient (client . WithAPIKey ( "test-api-key" ) ,
176176 client .WithTimeout (1 * time .Millisecond ), // Very short timeout to trigger error
177177 )
178178 c := New (cfg , WithGlobalBasePath (client .MgcUrl (ts .URL )))
0 commit comments