Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions AISKU/Tests/Unit/src/SnippetInitialization.Tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ export class SnippetInitializationTests extends AITestClass {
() => {
let theSnippet = this._initializeSnippet(snippetCreator(getSnippetConfig(this.sessionPrefix)));
const xhr = new XMLHttpRequest();
xhr.open('GET', 'https://httpbin.org/status/200');
xhr.open('GET', 'http://localhost:9001/README.md');
xhr.send();
Assert.ok(true);
}
Expand All @@ -694,15 +694,15 @@ export class SnippetInitializationTests extends AITestClass {
steps: [
() => {
let theSnippet = this._initializeSnippet(snippetCreator(getSnippetConfig(this.sessionPrefix)));
fetch('https://httpbin.org/status/200', { method: 'GET', headers: { 'header': 'value'} });
fetch('http://localhost:9001/README.md', { method: 'GET', headers: { 'header': 'value'} });
Assert.ok(true, "fetch monitoring is instrumented");
},
() => {
fetch('https://httpbin.org/status/200', { method: 'GET' });
fetch('http://localhost:9001/README.md', { method: 'GET' });
Assert.ok(true, "fetch monitoring is instrumented");
},
() => {
fetch('https://httpbin.org/status/200');
fetch('http://localhost:9001/README.md');
Assert.ok(true, "fetch monitoring is instrumented");
}
]
Expand Down
6 changes: 3 additions & 3 deletions AISKU/Tests/Unit/src/applicationinsights.e2e.tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1666,15 +1666,15 @@ export class ApplicationInsightsTests extends AITestClass {
fakeFetchAutoRespond: true,
steps: [
() => {
fetch('https://httpbin.org/status/200', { method: 'GET', headers: { 'header': 'value' } });
fetch('http://localhost:9001/README.md', { method: 'GET', headers: { 'header': 'value' } });
Assert.ok(true, "fetch monitoring is instrumented");
},
() => {
fetch('https://httpbin.org/status/200', { method: 'GET' });
fetch('http://localhost:9001/README.md', { method: 'GET' });
Assert.ok(true, "fetch monitoring is instrumented");
},
() => {
fetch('https://httpbin.org/status/200');
fetch('http://localhost:9001/README.md');
Assert.ok(true, "fetch monitoring is instrumented");
}
].concat(this.asserts(3, false, false))
Expand Down
2 changes: 1 addition & 1 deletion common/Tests/Framework/src/TestHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class TestHelper {
},
app: { sesId: "####" },
user: { locale: "en-US" },
web: { domain: "localhost" },
web: { domain: "localhost:9001" },
intweb: { },
utc: { popSample: 100 },
loc: { tz: "-08:00" },
Expand Down
34 changes: 17 additions & 17 deletions common/config/rush/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ export class W3CTraceStateDependencyTests extends AITestClass {
statusText: "Hello",
trailer: null,
type: "basic",
url: "https://httpbin.org/status/200"
url: "http://localhost:9001/README.md"
} as any);
}, 0);
});
Expand Down Expand Up @@ -378,7 +378,7 @@ export class W3CTraceStateDependencyTests extends AITestClass {
_ensureTraceStateValue(appInsightsCore);

// Use test hook to simulate the correct url location
this._ajax["_currentWindowHost"] = "httpbin.org";
this._ajax["_currentWindowHost"] = "localhost:9001";

// Setup
let headers = new Headers();
Expand All @@ -387,7 +387,7 @@ export class W3CTraceStateDependencyTests extends AITestClass {
method: 'get',
headers: headers
};
const url = 'https://httpbin.org/status/200';
const url = 'http://localhost:9001/README.md';

// Act
Assert.ok(trackSpy.notCalled, "No fetch called yet");
Expand Down Expand Up @@ -454,7 +454,7 @@ export class W3CTraceStateDependencyTests extends AITestClass {
statusText: "Hello",
trailer: null,
type: "basic",
url: "https://httpbin.org/status/200"
url: "http://localhost:9001/README.md"
} as any);
}, 0);
});
Expand Down Expand Up @@ -486,7 +486,7 @@ export class W3CTraceStateDependencyTests extends AITestClass {
_ensureTraceStateValue(appInsightsCore);

// Use test hook to simulate the correct url location
this._ajax["_currentWindowHost"] = "httpbin.org";
this._ajax["_currentWindowHost"] = "localhost:9001";

// Setup
let headers = new Headers();
Expand All @@ -495,7 +495,7 @@ export class W3CTraceStateDependencyTests extends AITestClass {
method: 'get',
headers: headers
};
const url = 'https://httpbin.org/status/200';
const url = 'http://localhost:9001/README.md';

// Act
Assert.ok(trackSpy.notCalled, "No fetch called yet");
Expand Down Expand Up @@ -561,7 +561,7 @@ export class W3CTraceStateDependencyTests extends AITestClass {
statusText: "Hello",
trailer: null,
type: "basic",
url: "https://httpbin.org/status/200"
url: "http://localhost:9001/README.md"
} as any);
}, 0);
});
Expand Down Expand Up @@ -591,7 +591,7 @@ export class W3CTraceStateDependencyTests extends AITestClass {
let trackSpy = this.sandbox.spy(appInsightsCore, "track");

// Use test hook to simulate the correct url location
this._ajax["_currentWindowHost"] = "httpbin.org";
this._ajax["_currentWindowHost"] = "localhost:9001";

// Setup
let headers = new Headers();
Expand All @@ -600,7 +600,7 @@ export class W3CTraceStateDependencyTests extends AITestClass {
method: 'get',
headers: headers
};
const url = 'https://httpbin.org/status/200';
const url = 'http://localhost:9001/README.md';

// Act
Assert.ok(trackSpy.notCalled, "No fetch called yet");
Expand Down Expand Up @@ -666,7 +666,7 @@ export class W3CTraceStateDependencyTests extends AITestClass {
statusText: "Hello",
trailer: null,
type: "basic",
url: "https://httpbin.org/status/200"
url: "http://localhost:9001/README.md"
} as any);
}, 0);
});
Expand All @@ -689,7 +689,7 @@ export class W3CTraceStateDependencyTests extends AITestClass {
let trackSpy = this.sandbox.spy(appInsightsCore, "track");

// Use test hook to simulate the correct url location
this._ajax["_currentWindowHost"] = "httpbin.org";
this._ajax["_currentWindowHost"] = "localhost:9001";

// Setup
let headers = new Headers();
Expand All @@ -698,7 +698,7 @@ export class W3CTraceStateDependencyTests extends AITestClass {
method: 'get',
headers: headers
};
const url = 'https://httpbin.org/status/200';
const url = 'http://localhost:9001/README.md';

// Act
Assert.ok(trackSpy.notCalled, "No fetch called yet");
Expand Down Expand Up @@ -764,7 +764,7 @@ export class W3CTraceStateDependencyTests extends AITestClass {
statusText: "Hello",
trailer: null,
type: "basic",
url: "https://httpbin.org/status/200"
url: "http://localhost:9001/README.md"
} as any);
}, 0);
});
Expand All @@ -787,7 +787,7 @@ export class W3CTraceStateDependencyTests extends AITestClass {
let trackSpy = this.sandbox.spy(appInsightsCore, "track");

// Use test hook to simulate the correct url location
this._ajax["_currentWindowHost"] = "httpbin.org";
this._ajax["_currentWindowHost"] = "localhost:9001";

// Setup
let headers = new Headers();
Expand All @@ -796,7 +796,7 @@ export class W3CTraceStateDependencyTests extends AITestClass {
method: 'get',
headers: headers
};
const url = 'https://httpbin.org/status/200';
const url = 'http://localhost:9001/README.md';

// Act
Assert.ok(trackSpy.notCalled, "No fetch called yet");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1373,7 +1373,7 @@ export class AjaxTests extends AITestClass {
});
this._ajax = new AjaxMonitor();
let appInsightsCore = new AppInsightsCore();
const ExcludeRequestRegex = ["localhost"];
const ExcludeRequestRegex = ["localhost:9001"];
let coreConfig = { instrumentationKey: "", disableFetchTracking: false, excludeRequestFromAutoTrackingPatterns: ExcludeRequestRegex };
appInsightsCore.initialize(coreConfig, [this._ajax, new TestChannelPlugin()]);
// Flush any initial requests made during initialization
Expand Down
6 changes: 3 additions & 3 deletions shared/AppInsightsCore/Tests/Unit/src/Common/Util.tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export class UtilTests extends AITestClass {
this.testRegexLists(config, false, "test");
this.testRegexLists(config, true, "portal.azure.com");
this.testRegexLists(config, true, "azure.com");
this.testRegexLists(config, false, "localhost");
this.testRegexLists(config, false, "localhost:9001");
this.testRegexLists(config, false, "bing.com");
this.testRegexLists(config, true, "prefix.bing.com");
}
Expand All @@ -193,7 +193,7 @@ export class UtilTests extends AITestClass {
this.testRegexLists(config, false, "test");
this.testRegexLists(config, false, "portal.azure.com");
this.testRegexLists(config, true, "azure.com");
this.testRegexLists(config, true, "localhost");
this.testRegexLists(config, true, "localhost:9001");
this.testRegexLists(config, true, "bing.com");
this.testRegexLists(config, true, "prefix.bing.com");
}
Expand All @@ -210,7 +210,7 @@ export class UtilTests extends AITestClass {
this.testRegexLists(config, false, "test");
this.testRegexLists(config, false, "portal.azure.com");
this.testRegexLists(config, true, "azure.com");
this.testRegexLists(config, false, "localhost");
this.testRegexLists(config, false, "localhost:9001");
this.testRegexLists(config, false, "bing.com");
this.testRegexLists(config, true, "prefix.bing.com");
this.testRegexLists(config, false, "ignore.microsoft.com");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { NoOpDataSource } from "./noOpDataSource";

export function createDataSource(configuration: IConfiguration): IDataSource {
// If on localhost, assume we are doing local testing (e.g. for accessibility issues) and use the NoOpDataSource
if (window.location.host.indexOf("localhost") === 0) {
if (window.location.host.indexOf("localhost:9001") === 0) {
return new NoOpDataSource();
}

Expand Down
Loading