Skip to content

Commit cbcd651

Browse files
committed
be more flexible in test environment
1 parent a95f905 commit cbcd651

40 files changed

+1156
-518
lines changed

tests/Audio/TranslationTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace OpenAI.Tests.Audio;
1212
[Category("Audio")]
1313
public partial class TranslationTests : OpenAIRecordedTestBase
1414
{
15-
public TranslationTests(bool isAsync) : base(isAsync)
15+
public TranslationTests(bool isAsync) : base(isAsync, RecordedTestMode.Record)
1616
{
1717
}
1818

tests/Responses/ResponsesToolTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace OpenAI.Tests.Responses;
1919
[Category("MCP")]
2020
public partial class ResponsesToolTests : OpenAIRecordedTestBase
2121
{
22-
public ResponsesToolTests(bool isAsync) : base(isAsync, RecordedTestMode.Record)
22+
public ResponsesToolTests(bool isAsync) : base(isAsync)
2323
{
2424
TestTimeoutInSeconds = 30;
2525
}

tests/SessionRecords/FilesTests/DeleteFile(False).json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"Accept": "application/json",
88
"Authorization": "Sanitized",
99
"Content-Length": "498",
10-
"Content-Type": "multipart/form-data; boundary=\"E0d9=PxTFMxJ=B7Z4tewR_0stAcFRG6nwwoMGtkK=jDK=z8F68BF_JK7lmOmTcGfUPHVSM\"",
10+
"Content-Type": "multipart/form-data; boundary=\"zLxL901Y3gueN6_Lps0xxdnxmva4VslL33lMTD1FRTddrJ3OjlobsylnNKi=1EssFVBF1a\"",
1111
"User-Agent": "OpenAI/2.4.0 (.NET 9.0.9; Microsoft Windows 10.0.26100)"
1212
},
1313
"RequestBody": null,
@@ -16,36 +16,36 @@
1616
"Access-Control-Allow-Origin": "*",
1717
"Alt-Svc": "h3=\":443\"",
1818
"cf-cache-status": "DYNAMIC",
19-
"CF-RAY": "980bbe6dea49a33b-SEA",
19+
"CF-RAY": "980bd1ded8b2d44f-SEA",
2020
"Connection": "keep-alive",
2121
"Content-Length": "246",
2222
"Content-Type": "application/json",
23-
"Date": "Wed, 17 Sep 2025 21:37:16 GMT",
23+
"Date": "Wed, 17 Sep 2025 21:50:33 GMT",
2424
"openai-organization": "Sanitized",
25-
"openai-processing-ms": "301",
25+
"openai-processing-ms": "423",
2626
"openai-project": "Sanitized",
2727
"openai-version": "2020-10-01",
2828
"Server": "cloudflare",
2929
"Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload",
3030
"X-Content-Type-Options": "nosniff",
31-
"x-envoy-upstream-service-time": "314",
31+
"x-envoy-upstream-service-time": "433",
3232
"x-openai-proxy-wasm": "v0.1",
3333
"X-Request-ID": "Sanitized"
3434
},
3535
"ResponseBody": {
3636
"object": "file",
37-
"id": "file-HhD9AFu8nb3fcccqamTZYm",
37+
"id": "file-RJmf9eCpcQ7pQuWEmGr5on",
3838
"purpose": "assistants",
3939
"filename": "test-file-delete-me.txt",
4040
"bytes": 50,
41-
"created_at": 1758145036,
41+
"created_at": 1758145832,
4242
"expires_at": null,
4343
"status": "processed",
4444
"status_details": null
4545
}
4646
},
4747
{
48-
"RequestUri": "https://api.openai.com/v1/files/file-HhD9AFu8nb3fcccqamTZYm",
48+
"RequestUri": "https://api.openai.com/v1/files/file-RJmf9eCpcQ7pQuWEmGr5on",
4949
"RequestMethod": "DELETE",
5050
"RequestHeaders": {
5151
"Accept": "application/json",
@@ -58,26 +58,26 @@
5858
"Access-Control-Allow-Origin": "*",
5959
"Alt-Svc": "h3=\":443\"",
6060
"cf-cache-status": "DYNAMIC",
61-
"CF-RAY": "980bbe707c92a33b-SEA",
61+
"CF-RAY": "980bd1e21be5d44f-SEA",
6262
"Connection": "keep-alive",
6363
"Content-Length": "81",
6464
"Content-Type": "application/json",
65-
"Date": "Wed, 17 Sep 2025 21:37:17 GMT",
65+
"Date": "Wed, 17 Sep 2025 21:50:33 GMT",
6666
"openai-organization": "Sanitized",
67-
"openai-processing-ms": "327",
67+
"openai-processing-ms": "294",
6868
"openai-project": "Sanitized",
6969
"openai-version": "2020-10-01",
7070
"Server": "cloudflare",
7171
"Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload",
7272
"X-Content-Type-Options": "nosniff",
73-
"x-envoy-upstream-service-time": "337",
73+
"x-envoy-upstream-service-time": "302",
7474
"x-openai-proxy-wasm": "v0.1",
7575
"X-Request-ID": "Sanitized"
7676
},
7777
"ResponseBody": {
7878
"object": "file",
7979
"deleted": true,
80-
"id": "file-HhD9AFu8nb3fcccqamTZYm"
80+
"id": "file-RJmf9eCpcQ7pQuWEmGr5on"
8181
}
8282
}
8383
],

tests/SessionRecords/FilesTests/DeleteFile(False)Async.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"Accept": "application/json",
88
"Authorization": "Sanitized",
99
"Content-Length": "498",
10-
"Content-Type": "multipart/form-data; boundary=\"Z7jDpdcqNZU9Ar_UOYR9zexneSB5QiqPWc7ct5EByUThTqRR_bAEhcGVWuD_F_6XBgRmSH\"",
10+
"Content-Type": "multipart/form-data; boundary=\"dW7eaL0FHBB=kcqUIC6zYRUuIEHwBrjQK16=BicK0pgqMQRZ3U6F30Y5DsefoKrO8yhVR4\"",
1111
"User-Agent": "OpenAI/2.4.0 (.NET 9.0.9; Microsoft Windows 10.0.26100)"
1212
},
1313
"RequestBody": null,
@@ -16,36 +16,36 @@
1616
"Access-Control-Allow-Origin": "*",
1717
"Alt-Svc": "h3=\":443\"",
1818
"cf-cache-status": "DYNAMIC",
19-
"CF-RAY": "980bbf3adad3a33b-SEA",
19+
"CF-RAY": "980bd2e90e1dd44f-SEA",
2020
"Connection": "keep-alive",
2121
"Content-Length": "246",
2222
"Content-Type": "application/json",
23-
"Date": "Wed, 17 Sep 2025 21:37:49 GMT",
23+
"Date": "Wed, 17 Sep 2025 21:51:16 GMT",
2424
"openai-organization": "Sanitized",
25-
"openai-processing-ms": "258",
25+
"openai-processing-ms": "766",
2626
"openai-project": "Sanitized",
2727
"openai-version": "2020-10-01",
2828
"Server": "cloudflare",
2929
"Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload",
3030
"X-Content-Type-Options": "nosniff",
31-
"x-envoy-upstream-service-time": "272",
31+
"x-envoy-upstream-service-time": "776",
3232
"x-openai-proxy-wasm": "v0.1",
3333
"X-Request-ID": "Sanitized"
3434
},
3535
"ResponseBody": {
3636
"object": "file",
37-
"id": "file-RXY6bPptKjF1hPGR1peyQ4",
37+
"id": "file-3i3iZZr4gRdQKvspAQBsoB",
3838
"purpose": "assistants",
3939
"filename": "test-file-delete-me.txt",
4040
"bytes": 50,
41-
"created_at": 1758145069,
41+
"created_at": 1758145875,
4242
"expires_at": null,
4343
"status": "processed",
4444
"status_details": null
4545
}
4646
},
4747
{
48-
"RequestUri": "https://api.openai.com/v1/files/file-RXY6bPptKjF1hPGR1peyQ4",
48+
"RequestUri": "https://api.openai.com/v1/files/file-3i3iZZr4gRdQKvspAQBsoB",
4949
"RequestMethod": "DELETE",
5050
"RequestHeaders": {
5151
"Accept": "application/json",
@@ -58,26 +58,26 @@
5858
"Access-Control-Allow-Origin": "*",
5959
"Alt-Svc": "h3=\":443\"",
6060
"cf-cache-status": "DYNAMIC",
61-
"CF-RAY": "980bbf3d0cdea33b-SEA",
61+
"CF-RAY": "980bd2ee6b0ad44f-SEA",
6262
"Connection": "keep-alive",
6363
"Content-Length": "81",
6464
"Content-Type": "application/json",
65-
"Date": "Wed, 17 Sep 2025 21:37:49 GMT",
65+
"Date": "Wed, 17 Sep 2025 21:51:16 GMT",
6666
"openai-organization": "Sanitized",
67-
"openai-processing-ms": "271",
67+
"openai-processing-ms": "297",
6868
"openai-project": "Sanitized",
6969
"openai-version": "2020-10-01",
7070
"Server": "cloudflare",
7171
"Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload",
7272
"X-Content-Type-Options": "nosniff",
73-
"x-envoy-upstream-service-time": "279",
73+
"x-envoy-upstream-service-time": "305",
7474
"x-openai-proxy-wasm": "v0.1",
7575
"X-Request-ID": "Sanitized"
7676
},
7777
"ResponseBody": {
7878
"object": "file",
7979
"deleted": true,
80-
"id": "file-RXY6bPptKjF1hPGR1peyQ4"
80+
"id": "file-3i3iZZr4gRdQKvspAQBsoB"
8181
}
8282
}
8383
],

tests/SessionRecords/FilesTests/DeleteFile(True).json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"Accept": "application/json",
88
"Authorization": "Sanitized",
99
"Content-Length": "498",
10-
"Content-Type": "multipart/form-data; boundary=\"quNqkcdSBcVPw_TNnShtBx3Q=049bzaM=W86dc1dqrQ_S0=ZQvoRIUoWz=u52=JaeLTJqC\"",
10+
"Content-Type": "multipart/form-data; boundary=\"swJA6CRq44J0RRNcywKfj8Ctf5BP_Ohz0PFgyNCEyUC1DF9Fmb4D43OH3NK6pU9ZBIBVZO\"",
1111
"User-Agent": "OpenAI/2.4.0 (.NET 9.0.9; Microsoft Windows 10.0.26100)"
1212
},
1313
"RequestBody": null,
@@ -16,13 +16,13 @@
1616
"Access-Control-Allow-Origin": "*",
1717
"Alt-Svc": "h3=\":443\"",
1818
"cf-cache-status": "DYNAMIC",
19-
"CF-RAY": "980bbe627e95a33b-SEA",
19+
"CF-RAY": "980bd1d9abd4d44f-SEA",
2020
"Connection": "keep-alive",
2121
"Content-Length": "246",
2222
"Content-Type": "application/json",
23-
"Date": "Wed, 17 Sep 2025 21:37:15 GMT",
23+
"Date": "Wed, 17 Sep 2025 21:50:32 GMT",
2424
"openai-organization": "Sanitized",
25-
"openai-processing-ms": "754",
25+
"openai-processing-ms": "220",
2626
"openai-project": "Sanitized",
2727
"openai-version": "2020-10-01",
2828
"Server": "cloudflare",
@@ -32,24 +32,24 @@
3232
],
3333
"Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload",
3434
"X-Content-Type-Options": "nosniff",
35-
"x-envoy-upstream-service-time": "763",
35+
"x-envoy-upstream-service-time": "229",
3636
"x-openai-proxy-wasm": "v0.1",
3737
"X-Request-ID": "Sanitized"
3838
},
3939
"ResponseBody": {
4040
"object": "file",
41-
"id": "file-Ew3h3G8G56RMkyv9dFpehR",
41+
"id": "file-F5xSpJFsE3Gzx3ELbJbRwf",
4242
"purpose": "assistants",
4343
"filename": "test-file-delete-me.txt",
4444
"bytes": 50,
45-
"created_at": 1758145034,
45+
"created_at": 1758145832,
4646
"expires_at": null,
4747
"status": "processed",
4848
"status_details": null
4949
}
5050
},
5151
{
52-
"RequestUri": "https://api.openai.com/v1/files/file-Ew3h3G8G56RMkyv9dFpehR",
52+
"RequestUri": "https://api.openai.com/v1/files/file-F5xSpJFsE3Gzx3ELbJbRwf",
5353
"RequestMethod": "DELETE",
5454
"RequestHeaders": {
5555
"Accept": "application/json",
@@ -62,26 +62,26 @@
6262
"Access-Control-Allow-Origin": "*",
6363
"Alt-Svc": "h3=\":443\"",
6464
"cf-cache-status": "DYNAMIC",
65-
"CF-RAY": "980bbe685c1da33b-SEA",
65+
"CF-RAY": "980bd1dbbdc8d44f-SEA",
6666
"Connection": "keep-alive",
6767
"Content-Length": "81",
6868
"Content-Type": "application/json",
69-
"Date": "Wed, 17 Sep 2025 21:37:16 GMT",
69+
"Date": "Wed, 17 Sep 2025 21:50:32 GMT",
7070
"openai-organization": "Sanitized",
71-
"openai-processing-ms": "565",
71+
"openai-processing-ms": "345",
7272
"openai-project": "Sanitized",
7373
"openai-version": "2020-10-01",
7474
"Server": "cloudflare",
7575
"Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload",
7676
"X-Content-Type-Options": "nosniff",
77-
"x-envoy-upstream-service-time": "576",
77+
"x-envoy-upstream-service-time": "357",
7878
"x-openai-proxy-wasm": "v0.1",
7979
"X-Request-ID": "Sanitized"
8080
},
8181
"ResponseBody": {
8282
"object": "file",
8383
"deleted": true,
84-
"id": "file-Ew3h3G8G56RMkyv9dFpehR"
84+
"id": "file-F5xSpJFsE3Gzx3ELbJbRwf"
8585
}
8686
}
8787
],

tests/SessionRecords/FilesTests/DeleteFile(True)Async.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"Accept": "application/json",
88
"Authorization": "Sanitized",
99
"Content-Length": "498",
10-
"Content-Type": "multipart/form-data; boundary=\"m9WB=pVcwI_FXg9Zg_4rc8f2HWxTGfwcJg6VXa_tdcWwCcJWYLDdMPcbJDZvUPs1XEqYyV\"",
10+
"Content-Type": "multipart/form-data; boundary=\"NBPl7aVUx_Wq49x=rOC90lnmyrODNV3HC0w57R7ghZXG9hCsH6djzqrVsiCq06OZciRbsE\"",
1111
"User-Agent": "OpenAI/2.4.0 (.NET 9.0.9; Microsoft Windows 10.0.26100)"
1212
},
1313
"RequestBody": null,
@@ -16,36 +16,36 @@
1616
"Access-Control-Allow-Origin": "*",
1717
"Alt-Svc": "h3=\":443\"",
1818
"cf-cache-status": "DYNAMIC",
19-
"CF-RAY": "980bbf311b2fa33b-SEA",
19+
"CF-RAY": "980bd2df7d63d44f-SEA",
2020
"Connection": "keep-alive",
2121
"Content-Length": "246",
2222
"Content-Type": "application/json",
23-
"Date": "Wed, 17 Sep 2025 21:37:48 GMT",
23+
"Date": "Wed, 17 Sep 2025 21:51:14 GMT",
2424
"openai-organization": "Sanitized",
25-
"openai-processing-ms": "848",
25+
"openai-processing-ms": "888",
2626
"openai-project": "Sanitized",
2727
"openai-version": "2020-10-01",
2828
"Server": "cloudflare",
2929
"Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload",
3030
"X-Content-Type-Options": "nosniff",
31-
"x-envoy-upstream-service-time": "857",
31+
"x-envoy-upstream-service-time": "903",
3232
"x-openai-proxy-wasm": "v0.1",
3333
"X-Request-ID": "Sanitized"
3434
},
3535
"ResponseBody": {
3636
"object": "file",
37-
"id": "file-A29WFLyMrWM1YqPN6LF2tM",
37+
"id": "file-FfMeMnQT5zeVXEwWXPmrGM",
3838
"purpose": "assistants",
3939
"filename": "test-file-delete-me.txt",
4040
"bytes": 50,
41-
"created_at": 1758145067,
41+
"created_at": 1758145873,
4242
"expires_at": null,
4343
"status": "processed",
4444
"status_details": null
4545
}
4646
},
4747
{
48-
"RequestUri": "https://api.openai.com/v1/files/file-A29WFLyMrWM1YqPN6LF2tM",
48+
"RequestUri": "https://api.openai.com/v1/files/file-FfMeMnQT5zeVXEwWXPmrGM",
4949
"RequestMethod": "DELETE",
5050
"RequestHeaders": {
5151
"Accept": "application/json",
@@ -58,26 +58,26 @@
5858
"Access-Control-Allow-Origin": "*",
5959
"Alt-Svc": "h3=\":443\"",
6060
"cf-cache-status": "DYNAMIC",
61-
"CF-RAY": "980bbf373fc8a33b-SEA",
61+
"CF-RAY": "980bd2e5ab2fd44f-SEA",
6262
"Connection": "keep-alive",
6363
"Content-Length": "81",
6464
"Content-Type": "application/json",
65-
"Date": "Wed, 17 Sep 2025 21:37:49 GMT",
65+
"Date": "Wed, 17 Sep 2025 21:51:15 GMT",
6666
"openai-organization": "Sanitized",
67-
"openai-processing-ms": "429",
67+
"openai-processing-ms": "392",
6868
"openai-project": "Sanitized",
6969
"openai-version": "2020-10-01",
7070
"Server": "cloudflare",
7171
"Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload",
7272
"X-Content-Type-Options": "nosniff",
73-
"x-envoy-upstream-service-time": "444",
73+
"x-envoy-upstream-service-time": "408",
7474
"x-openai-proxy-wasm": "v0.1",
7575
"X-Request-ID": "Sanitized"
7676
},
7777
"ResponseBody": {
7878
"object": "file",
7979
"deleted": true,
80-
"id": "file-A29WFLyMrWM1YqPN6LF2tM"
80+
"id": "file-FfMeMnQT5zeVXEwWXPmrGM"
8181
}
8282
}
8383
],

tests/SessionRecords/FilesTests/DeleteFileCanParseServiceError.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@
1414
"Access-Control-Allow-Origin": "*",
1515
"Alt-Svc": "h3=\":443\"",
1616
"cf-cache-status": "DYNAMIC",
17-
"CF-RAY": "980bbe951c02a33b-SEA",
17+
"CF-RAY": "980bd27ea998d44f-SEA",
1818
"Connection": "keep-alive",
1919
"Content-Length": "141",
2020
"Content-Type": "application/json",
21-
"Date": "Wed, 17 Sep 2025 21:37:22 GMT",
21+
"Date": "Wed, 17 Sep 2025 21:50:58 GMT",
2222
"openai-organization": "Sanitized",
23-
"openai-processing-ms": "52",
23+
"openai-processing-ms": "49",
2424
"openai-project": "Sanitized",
2525
"openai-version": "2020-10-01",
2626
"Server": "cloudflare",
2727
"Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload",
2828
"X-Content-Type-Options": "nosniff",
29-
"x-envoy-upstream-service-time": "63",
29+
"x-envoy-upstream-service-time": "62",
3030
"x-openai-proxy-wasm": "v0.1",
3131
"X-Request-ID": "Sanitized"
3232
},

0 commit comments

Comments
 (0)