diff --git a/sdk/messaging/azwebpubsub/assets.json b/sdk/messaging/azwebpubsub/assets.json index 22cfa27c00cf..be4b340ed34b 100644 --- a/sdk/messaging/azwebpubsub/assets.json +++ b/sdk/messaging/azwebpubsub/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "go", "TagPrefix": "go/messaging/azwebpubsub", - "Tag": "go/messaging/azwebpubsub_94be93d99b" + "Tag": "go/messaging/azwebpubsub_2540bb848a" } diff --git a/sdk/messaging/azwebpubsub/client_shared_test.go b/sdk/messaging/azwebpubsub/client_shared_test.go index a5abc7d405b5..3f6882141afc 100644 --- a/sdk/messaging/azwebpubsub/client_shared_test.go +++ b/sdk/messaging/azwebpubsub/client_shared_test.go @@ -26,7 +26,7 @@ type clientWrapper struct { } var fakeTestVars = testVars{ - ConnectionString: "Endpoint=https://fake.eastus-1.webpubsub.azure.com;AccessKey=ABCDE;", + ConnectionString: "Endpoint=https://fake.webpubsub.azure.com;AccessKey=ABCDE;", } type testVars struct { @@ -109,7 +109,7 @@ func loadClientOptions(t *testing.T) (testVars, *azcore.ClientOptions) { } } else { options = &azcore.ClientOptions{ - Transport: newRecordingTransporter(t, tv), + Transport: newRecordingTransporter(t), } } @@ -141,61 +141,16 @@ func newClientWrapper(t *testing.T) clientWrapper { } } -func newRecordingTransporter(t *testing.T, testVars testVars) policy.Transporter { +func newRecordingTransporter(t *testing.T) policy.Transporter { transport, err := recording.NewRecordingHTTPClient(t, nil) require.NoError(t, err) err = recording.Start(t, "sdk/messaging/azwebpubsub/testdata", nil) require.NoError(t, err) - err = recording.AddURISanitizer("https://fake_endpoint.com/", testVars.Endpoint, nil) - require.NoError(t, err) err = recording.AddGeneralRegexSanitizer(`"Date": "Wed, 15 Nov 2023 08:00:00 GMT"`, `"Date":".+?"`, nil) require.NoError(t, err) - err = recording.AddGeneralRegexSanitizer( - `"id":"00000000-0000-0000-0000-000000000000"`, - `"id":"[^"]+"`, nil) - require.NoError(t, err) - - err = recording.AddGeneralRegexSanitizer( - `"lockToken":"fake-lock-token"`, - `"lockToken":\s*"[^"]+"`, nil) - require.NoError(t, err) - - err = recording.AddGeneralRegexSanitizer( - `"lockTokens": ["fake-lock-token"]`, - `"lockTokens":\s*\[\s*"[^"]+"\s*\]`, nil) - require.NoError(t, err) - - err = recording.AddGeneralRegexSanitizer( - `"succeededLockTokens": ["fake-lock-token"]`, - `"succeededLockTokens":\s*\[\s*"[^"]+"\s*\]`, nil) - require.NoError(t, err) - - err = recording.AddGeneralRegexSanitizer( - `"succeededLockTokens": ["fake-lock-token", "fake-lock-token", "fake-lock-token"]`, - `"succeededLockTokens":\s*`+ - `\[`+ - `(\s*"[^"]+"\s*\,){2}`+ - `\s*"[^"]+"\s*`+ - `\]`, nil) - require.NoError(t, err) - - err = recording.AddGeneralRegexSanitizer( - `"lockTokens": ["fake-lock-token", "fake-lock-token"]`, - `"lockTokens":\s*\[\s*"[^"]+"\s*\,\s*"[^"]+"\s*\]`, nil) - require.NoError(t, err) - - err = recording.AddGeneralRegexSanitizer( - `"lockTokens": ["fake-lock-token", "fake-lock-token", "fake-lock-token"]`, - `"lockTokens":\s*`+ - `\[`+ - `(\s*"[^"]+"\s*\,){2}`+ - `\s*"[^"]+"\s*`+ - `\]`, nil) - require.NoError(t, err) - t.Cleanup(func() { err := recording.Stop(t, nil) require.NoError(t, err) diff --git a/sdk/messaging/azwebpubsub/client_test.go b/sdk/messaging/azwebpubsub/client_test.go index d20d8e4afbc7..f8bfd409e43c 100644 --- a/sdk/messaging/azwebpubsub/client_test.go +++ b/sdk/messaging/azwebpubsub/client_test.go @@ -15,16 +15,12 @@ import ( "testing" "github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming" - "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/messaging/azwebpubsub" "github.com/golang-jwt/jwt" "github.com/stretchr/testify/require" ) func TestClient_SendToAll(t *testing.T) { - if recording.GetRecordMode() == recording.PlaybackMode { - t.Skip("https://github.com/Azure/azure-sdk-for-go/issues/22869") - } client := newClientWrapper(t) hub := "hub1" _, err := client.SendToAll(context.Background(), hub, @@ -44,9 +40,6 @@ func TestClient_SendToAll(t *testing.T) { } func TestClient_ManagePermissions(t *testing.T) { - if recording.GetRecordMode() == recording.PlaybackMode { - t.Skip("https://github.com/Azure/azure-sdk-for-go/issues/22869") - } client := newClientWrapper(t) const hub = "chat" const conn1 = "conn1" @@ -62,9 +55,6 @@ func TestClient_ManagePermissions(t *testing.T) { } func TestClient_CloseConnections(t *testing.T) { - if recording.GetRecordMode() == recording.PlaybackMode { - t.Skip("https://github.com/Azure/azure-sdk-for-go/issues/22869") - } client := newClientWrapper(t) const hub = "chat" const conn1 = "conn1"