Skip to content

Commit c99558a

Browse files
chlowellscbedd
authored andcommitted
Upgrade test proxy, broken tests run only in live and recording modes
[azp skip]
1 parent 73894f3 commit c99558a

File tree

259 files changed

+992
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

259 files changed

+992
-5
lines changed

eng/target_proxy_version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.0-dev.20240410.1
1+
1.0.0-dev.20240508.1

sdk/ai/azopenai/client_audio_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ import (
2121
)
2222

2323
func TestClient_GetAudioTranscription(t *testing.T) {
24+
if recording.GetRecordMode() == recording.PlaybackMode {
25+
t.Skip("https://github.com/Azure/azure-sdk-for-go/issues/22869")
26+
}
2427
testFn := func(t *testing.T, epm endpointWithModel) {
2528
client := newTestClient(t, epm.Endpoint)
2629
model := epm.Model
@@ -136,6 +139,9 @@ func TestClient_GetAudioTranscription(t *testing.T) {
136139
}
137140

138141
func TestClient_GetAudioTranslation(t *testing.T) {
142+
if recording.GetRecordMode() == recording.PlaybackMode {
143+
t.Skip("https://github.com/Azure/azure-sdk-for-go/issues/22869")
144+
}
139145
testFn := func(t *testing.T, epm endpointWithModel) {
140146
client := newTestClient(t, epm.Endpoint)
141147
model := epm.Model
@@ -252,7 +258,7 @@ func TestClient_GetAudioTranslation(t *testing.T) {
252258

253259
func TestClient_GetAudioSpeech(t *testing.T) {
254260
if recording.GetRecordMode() == recording.PlaybackMode {
255-
t.Skip("TODO: sanitization break: needs to be looked at")
261+
t.Skip("https://github.com/Azure/azure-sdk-for-go/issues/22869")
256262
}
257263

258264
client := newTestClient(t, openAI.Speech.Endpoint)

sdk/ai/azopenai/client_functions_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111

1212
"github.com/Azure/azure-sdk-for-go/sdk/ai/azopenai"
1313
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
14+
"github.com/Azure/azure-sdk-for-go/sdk/internal/recording"
1415
"github.com/stretchr/testify/require"
1516
)
1617

@@ -27,6 +28,9 @@ type ParamProperty struct {
2728
}
2829

2930
func TestGetChatCompletions_usingFunctions(t *testing.T) {
31+
if recording.GetRecordMode() == recording.PlaybackMode {
32+
t.Skip("https://github.com/Azure/azure-sdk-for-go/issues/22869")
33+
}
3034
// https://platform.openai.com/docs/guides/gpt/function-calling
3135

3236
testFn := func(t *testing.T, chatClient *azopenai.Client, deploymentName string, toolChoice *azopenai.ChatCompletionsToolChoice) {
@@ -127,6 +131,9 @@ func TestGetChatCompletions_usingFunctions(t *testing.T) {
127131
}
128132

129133
func TestGetChatCompletions_usingFunctions_legacy(t *testing.T) {
134+
if recording.GetRecordMode() == recording.PlaybackMode {
135+
t.Skip("https://github.com/Azure/azure-sdk-for-go/issues/22869")
136+
}
130137
testFn := func(t *testing.T, epm endpointWithModel) {
131138
client := newTestClient(t, epm.Endpoint)
132139

sdk/ai/azopenaiassistants/client_test.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ func TestAssistantCreationAndListing(t *testing.T) {
123123
}
124124

125125
func TestAssistantMessages(t *testing.T) {
126+
if recording.GetRecordMode() == recording.PlaybackMode {
127+
t.Skip("https://github.com/Azure/azure-sdk-for-go/issues/22869")
128+
}
126129
testFn := func(t *testing.T, azure bool) {
127130
client := newClient(t, newClientArgs{
128131
Azure: azure,
@@ -196,8 +199,8 @@ func TestAssistantMessages(t *testing.T) {
196199
}
197200

198201
func skipRecordingsCantMatchRoutesTestHack(t *testing.T) {
199-
if recording.GetRecordMode() != recording.LiveMode {
200-
t.Skip("skipping due to issue where recordings never match. Issue #22839")
202+
if recording.GetRecordMode() == recording.PlaybackMode {
203+
t.Skip("skipping due to issue where recordings never match. Issue #22839. Also #22869")
201204
}
202205
}
203206

@@ -655,6 +658,9 @@ func TestNewListRunStepsPager(t *testing.T) {
655658
}
656659

657660
func TestFiles(t *testing.T) {
661+
if recording.GetRecordMode() == recording.PlaybackMode {
662+
t.Skip("https://github.com/Azure/azure-sdk-for-go/issues/22869")
663+
}
658664
testFn := func(t *testing.T, azure bool) {
659665
client := newClient(t, newClientArgs{
660666
Azure: azure,

sdk/containers/azcontainerregistry/authentication_policy_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import (
1717
"github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming"
1818
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
1919
"github.com/Azure/azure-sdk-for-go/sdk/internal/mock"
20+
"github.com/Azure/azure-sdk-for-go/sdk/internal/recording"
2021
"github.com/Azure/azure-sdk-for-go/sdk/internal/temporal"
2122
"github.com/stretchr/testify/require"
2223
"net/http"
@@ -126,6 +127,9 @@ func Test_findServiceAndScope(t *testing.T) {
126127
}
127128

128129
func Test_authenticationPolicy_getAccessToken_live(t *testing.T) {
130+
if recording.GetRecordMode() == recording.PlaybackMode {
131+
t.Skip("https://github.com/Azure/azure-sdk-for-go/issues/22869")
132+
}
129133
startRecording(t)
130134
endpoint, cred, options := getEndpointCredAndClientOptions(t)
131135
if reflect.ValueOf(options.Cloud).IsZero() {

sdk/containers/azcontainerregistry/blob_client_test.go

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
1616
"github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming"
1717
"github.com/Azure/azure-sdk-for-go/sdk/internal/mock"
18+
"github.com/Azure/azure-sdk-for-go/sdk/internal/recording"
1819
"github.com/stretchr/testify/require"
1920
"io"
2021
"net/http"
@@ -26,6 +27,9 @@ import (
2627
const alpineBlobDigest = "sha256:042a816809aac8d0f7d7cacac7965782ee2ecac3f21bcf9f24b1de1a7387b769"
2728

2829
func TestBlobClient_CancelUpload(t *testing.T) {
30+
if recording.GetRecordMode() == recording.PlaybackMode {
31+
t.Skip("https://github.com/Azure/azure-sdk-for-go/issues/22869")
32+
}
2933
startRecording(t)
3034
endpoint, cred, options := getEndpointCredAndClientOptions(t)
3135
ctx := context.Background()
@@ -48,6 +52,9 @@ func TestBlobClient_CancelUpload_fail(t *testing.T) {
4852
}
4953

5054
func TestBlobClient_CheckBlobExists(t *testing.T) {
55+
if recording.GetRecordMode() == recording.PlaybackMode {
56+
t.Skip("https://github.com/Azure/azure-sdk-for-go/issues/22869")
57+
}
5158
startRecording(t)
5259
endpoint, cred, options := getEndpointCredAndClientOptions(t)
5360
ctx := context.Background()
@@ -79,6 +86,9 @@ func TestBlobClient_CheckBlobExists_empty(t *testing.T) {
7986
}
8087

8188
func TestBlobClient_CheckChunkExists(t *testing.T) {
89+
if recording.GetRecordMode() == recording.PlaybackMode {
90+
t.Skip("https://github.com/Azure/azure-sdk-for-go/issues/22869")
91+
}
8292
startRecording(t)
8393
endpoint, cred, options := getEndpointCredAndClientOptions(t)
8494
ctx := context.Background()
@@ -110,6 +120,9 @@ func TestBlobClient_CheckChunkExists_empty(t *testing.T) {
110120
}
111121

112122
func TestBlobClient_completeUpload_wrongDigest(t *testing.T) {
123+
if recording.GetRecordMode() == recording.PlaybackMode {
124+
t.Skip("https://github.com/Azure/azure-sdk-for-go/issues/22869")
125+
}
113126
startRecording(t)
114127
endpoint, cred, options := getEndpointCredAndClientOptions(t)
115128
ctx := context.Background()
@@ -128,6 +141,9 @@ func TestBlobClient_completeUpload_wrongDigest(t *testing.T) {
128141
}
129142

130143
func TestBlobClient_DeleteBlob(t *testing.T) {
144+
if recording.GetRecordMode() == recording.PlaybackMode {
145+
t.Skip("https://github.com/Azure/azure-sdk-for-go/issues/22869")
146+
}
131147
startRecording(t)
132148
endpoint, cred, options := getEndpointCredAndClientOptions(t)
133149
ctx := context.Background()
@@ -158,6 +174,9 @@ func TestBlobClient_DeleteBlob_empty(t *testing.T) {
158174
}
159175

160176
func TestBlobClient_GetBlob(t *testing.T) {
177+
if recording.GetRecordMode() == recording.PlaybackMode {
178+
t.Skip("https://github.com/Azure/azure-sdk-for-go/issues/22869")
179+
}
161180
startRecording(t)
162181
endpoint, cred, options := getEndpointCredAndClientOptions(t)
163182
ctx := context.Background()
@@ -213,6 +232,9 @@ func TestBlobClient_GetBlob_empty(t *testing.T) {
213232
}
214233

215234
func TestBlobClient_GetChunk(t *testing.T) {
235+
if recording.GetRecordMode() == recording.PlaybackMode {
236+
t.Skip("https://github.com/Azure/azure-sdk-for-go/issues/22869")
237+
}
216238
startRecording(t)
217239
endpoint, cred, options := getEndpointCredAndClientOptions(t)
218240
ctx := context.Background()
@@ -262,6 +284,9 @@ func TestBlobClient_GetChunk_empty(t *testing.T) {
262284
}
263285

264286
func TestBlobClient_GetUploadStatus(t *testing.T) {
287+
if recording.GetRecordMode() == recording.PlaybackMode {
288+
t.Skip("https://github.com/Azure/azure-sdk-for-go/issues/22869")
289+
}
265290
startRecording(t)
266291
endpoint, cred, options := getEndpointCredAndClientOptions(t)
267292
ctx := context.Background()
@@ -287,6 +312,9 @@ func TestBlobClient_GetUploadStatus_fail(t *testing.T) {
287312
}
288313

289314
func TestBlobClient_MountBlob(t *testing.T) {
315+
if recording.GetRecordMode() == recording.PlaybackMode {
316+
t.Skip("https://github.com/Azure/azure-sdk-for-go/issues/22869")
317+
}
290318
startRecording(t)
291319
endpoint, cred, options := getEndpointCredAndClientOptions(t)
292320
ctx := context.Background()
@@ -316,6 +344,9 @@ func TestBlobClient_MountBlob_empty(t *testing.T) {
316344
}
317345

318346
func TestBlobClient_StartUpload(t *testing.T) {
347+
if recording.GetRecordMode() == recording.PlaybackMode {
348+
t.Skip("https://github.com/Azure/azure-sdk-for-go/issues/22869")
349+
}
319350
startRecording(t)
320351
endpoint, cred, options := getEndpointCredAndClientOptions(t)
321352
ctx := context.Background()

sdk/containers/azcontainerregistry/blob_custom_client_test.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@ import (
1616
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
1717
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
1818
"github.com/Azure/azure-sdk-for-go/sdk/internal/mock"
19+
"github.com/Azure/azure-sdk-for-go/sdk/internal/recording"
1920
"github.com/stretchr/testify/require"
2021
"io"
2122
"net/http"
2223
"testing"
2324
)
2425

2526
func TestBlobClient_CompleteUpload(t *testing.T) {
27+
if recording.GetRecordMode() == recording.PlaybackMode {
28+
t.Skip("https://github.com/Azure/azure-sdk-for-go/issues/22869")
29+
}
2630
startRecording(t)
2731
endpoint, cred, options := getEndpointCredAndClientOptions(t)
2832
ctx := context.Background()
@@ -43,6 +47,9 @@ func TestBlobClient_CompleteUpload(t *testing.T) {
4347
}
4448

4549
func TestBlobClient_UploadChunk(t *testing.T) {
50+
if recording.GetRecordMode() == recording.PlaybackMode {
51+
t.Skip("https://github.com/Azure/azure-sdk-for-go/issues/22869")
52+
}
4653
startRecording(t)
4754
endpoint, cred, options := getEndpointCredAndClientOptions(t)
4855
ctx := context.Background()
@@ -63,6 +70,9 @@ func TestBlobClient_UploadChunk(t *testing.T) {
6370
}
6471

6572
func TestBlobClient_CompleteUpload_uploadByChunk(t *testing.T) {
73+
if recording.GetRecordMode() == recording.PlaybackMode {
74+
t.Skip("https://github.com/Azure/azure-sdk-for-go/issues/22869")
75+
}
6676
startRecording(t)
6777
endpoint, cred, options := getEndpointCredAndClientOptions(t)
6878
ctx := context.Background()
@@ -112,6 +122,9 @@ func TestNewBlobClient(t *testing.T) {
112122
}
113123

114124
func TestBlobClient_CompleteUpload_uploadByChunkFailOver(t *testing.T) {
125+
if recording.GetRecordMode() == recording.PlaybackMode {
126+
t.Skip("https://github.com/Azure/azure-sdk-for-go/issues/22869")
127+
}
115128
startRecording(t)
116129
endpoint, cred, options := getEndpointCredAndClientOptions(t)
117130
ctx := context.Background()

0 commit comments

Comments
 (0)