Skip to content

Commit cd49714

Browse files
[Recorder] [Template] Fix browser test failure (#20203)
* fix test * Update sdk/template/template/test/public/configurationClient.spec.ts * missing recording
1 parent 752a736 commit cd49714

File tree

2 files changed

+57
-1
lines changed

2 files changed

+57
-1
lines changed

sdk/template/template/recordings/browsers/aad_configurationclient_functional_tests_getconfigurationsetting/recording_supports_tracing.json

Lines changed: 51 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/template/template/test/public/configurationClient.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ describe("[AAD] ConfigurationClient functional tests", function () {
8888
// the `getConfigurationSetting` method is being traced correctly, that the
8989
// tracing span is properly parented and closed.
9090
it("supports tracing", async () => {
91+
// Playback fails in the browser without the "HeaderlessMatcher"
92+
//
93+
// If-Modified-Since & If-None-Match headers are not present in the recording and the request in playback has these headers
94+
// Proxy tool doesn't treat these headers differently, tries to match them with the headers in the recording, and fails.
95+
// More details here - https://github.com/Azure/azure-sdk-tools/issues/2674
96+
await recorder.setMatcher("HeaderlessMatcher");
9197
const key = assertEnvironmentVariable("APPCONFIG_TEST_SETTING_KEY");
9298
await assert.supportsTracing(
9399
(options) => client.getConfigurationSetting(key, options),

0 commit comments

Comments
 (0)