@@ -112,7 +112,7 @@ func TestMultiClient(t *testing.T) {
112112 t .Fatalf ("Failed to send message: %v" , err )
113113 }
114114
115- if response == nil || response .Data .Content == nil || ! strings .Contains (* response .Data .Content . String , "MAGIC_hello_42" ) {
115+ if response == nil || response .Data .Content == nil || ! strings .Contains (* response .Data .Content , "MAGIC_hello_42" ) {
116116 t .Errorf ("Expected response to contain 'MAGIC_hello_42', got %v" , response )
117117 }
118118
@@ -180,7 +180,7 @@ func TestMultiClient(t *testing.T) {
180180 if err != nil {
181181 t .Fatalf ("Failed to send message: %v" , err )
182182 }
183- if response == nil || response .Data .Content == nil || * response .Data .Content . String == "" {
183+ if response == nil || response .Data .Content == nil || * response .Data .Content == "" {
184184 t .Errorf ("Expected non-empty response" )
185185 }
186186
@@ -371,8 +371,8 @@ func TestMultiClient(t *testing.T) {
371371 if response1 == nil || response1 .Data .Content == nil {
372372 t .Fatalf ("Expected response with content" )
373373 }
374- if ! strings .Contains (* response1 .Data .Content . String , "CITY_FOR_US" ) {
375- t .Errorf ("Expected response to contain 'CITY_FOR_US', got '%s'" , * response1 .Data .Content . String )
374+ if ! strings .Contains (* response1 .Data .Content , "CITY_FOR_US" ) {
375+ t .Errorf ("Expected response to contain 'CITY_FOR_US', got '%s'" , * response1 .Data .Content )
376376 }
377377
378378 response2 , err := session1 .SendAndWait (t .Context (), copilot.MessageOptions {
@@ -384,8 +384,8 @@ func TestMultiClient(t *testing.T) {
384384 if response2 == nil || response2 .Data .Content == nil {
385385 t .Fatalf ("Expected response with content" )
386386 }
387- if ! strings .Contains (* response2 .Data .Content . String , "CURRENCY_FOR_US" ) {
388- t .Errorf ("Expected response to contain 'CURRENCY_FOR_US', got '%s'" , * response2 .Data .Content . String )
387+ if ! strings .Contains (* response2 .Data .Content , "CURRENCY_FOR_US" ) {
388+ t .Errorf ("Expected response to contain 'CURRENCY_FOR_US', got '%s'" , * response2 .Data .Content )
389389 }
390390
391391 session2 .Disconnect ()
@@ -436,8 +436,8 @@ func TestMultiClient(t *testing.T) {
436436 if stableResponse == nil || stableResponse .Data .Content == nil {
437437 t .Fatalf ("Expected response with content" )
438438 }
439- if ! strings .Contains (* stableResponse .Data .Content . String , "STABLE_test1" ) {
440- t .Errorf ("Expected response to contain 'STABLE_test1', got '%s'" , * stableResponse .Data .Content . String )
439+ if ! strings .Contains (* stableResponse .Data .Content , "STABLE_test1" ) {
440+ t .Errorf ("Expected response to contain 'STABLE_test1', got '%s'" , * stableResponse .Data .Content )
441441 }
442442
443443 ephemeralResponse , err := session1 .SendAndWait (t .Context (), copilot.MessageOptions {
@@ -449,8 +449,8 @@ func TestMultiClient(t *testing.T) {
449449 if ephemeralResponse == nil || ephemeralResponse .Data .Content == nil {
450450 t .Fatalf ("Expected response with content" )
451451 }
452- if ! strings .Contains (* ephemeralResponse .Data .Content . String , "EPHEMERAL_test2" ) {
453- t .Errorf ("Expected response to contain 'EPHEMERAL_test2', got '%s'" , * ephemeralResponse .Data .Content . String )
452+ if ! strings .Contains (* ephemeralResponse .Data .Content , "EPHEMERAL_test2" ) {
453+ t .Errorf ("Expected response to contain 'EPHEMERAL_test2', got '%s'" , * ephemeralResponse .Data .Content )
454454 }
455455
456456 // Disconnect client 2 without destroying the shared session
@@ -474,12 +474,12 @@ func TestMultiClient(t *testing.T) {
474474 if afterResponse == nil || afterResponse .Data .Content == nil {
475475 t .Fatalf ("Expected response with content" )
476476 }
477- if ! strings .Contains (* afterResponse .Data .Content . String , "STABLE_still_here" ) {
478- t .Errorf ("Expected response to contain 'STABLE_still_here', got '%s'" , * afterResponse .Data .Content . String )
477+ if ! strings .Contains (* afterResponse .Data .Content , "STABLE_still_here" ) {
478+ t .Errorf ("Expected response to contain 'STABLE_still_here', got '%s'" , * afterResponse .Data .Content )
479479 }
480480 // ephemeral_tool should NOT have produced a result
481- if strings .Contains (* afterResponse .Data .Content . String , "EPHEMERAL_" ) {
482- t .Errorf ("Expected response NOT to contain 'EPHEMERAL_', got '%s'" , * afterResponse .Data .Content . String )
481+ if strings .Contains (* afterResponse .Data .Content , "EPHEMERAL_" ) {
482+ t .Errorf ("Expected response NOT to contain 'EPHEMERAL_', got '%s'" , * afterResponse .Data .Content )
483483 }
484484 })
485485}
0 commit comments