test(web): use a documentation IP instead of a tailnet-range fixture
Swap the 100.x CGNAT example for 192.0.2.10 (RFC 5737 TEST-NET-1) in the token-transport guard tests — keeps the non-loopback-HTTP assertion, drops an environment-specific address.
This commit is contained in:
@@ -27,11 +27,11 @@ describe("security URL helpers", () => {
|
||||
expect(isSecureTokenTransport("http://localhost:8000")).toBe(true);
|
||||
expect(isSecureTokenTransport("http://127.0.0.1:8000")).toBe(true);
|
||||
expect(isSecureTokenTransport("http://192.168.1.50:8000")).toBe(false);
|
||||
expect(isSecureTokenTransport("http://100.67.206.76:8000")).toBe(false);
|
||||
expect(isSecureTokenTransport("http://192.0.2.10:8000")).toBe(false);
|
||||
});
|
||||
|
||||
it("returns a user-facing error for insecure token transport", () => {
|
||||
expect(tokenTransportError("http://100.67.206.76:8000")).toMatch(/HTTPS/);
|
||||
expect(tokenTransportError("http://192.0.2.10:8000")).toMatch(/HTTPS/);
|
||||
expect(tokenTransportError("https://honcho.example.com")).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -58,7 +58,7 @@ describe("SettingsForm — self-hosted preset", () => {
|
||||
renderForm(<SettingsForm instance={null} preset="self-hosted" />);
|
||||
const baseUrl = screen.getByPlaceholderText("http://localhost:8000");
|
||||
await user.clear(baseUrl);
|
||||
await user.type(baseUrl, "http://100.67.206.76:8000");
|
||||
await user.type(baseUrl, "http://192.0.2.10:8000");
|
||||
await user.type(
|
||||
screen.getByPlaceholderText(/required only if your instance has auth enabled/i),
|
||||
"secret-token",
|
||||
|
||||
Reference in New Issue
Block a user