Skip to content

Commit 10fe553

Browse files
committed
Routing by hostname on main: production-mode tests get storage and OAuth settings; one Cargo.toml tracing entry; the OAuth discovery test expects the tests' APP_URL (https://app.visualci.test, since #59)
1 parent 51fd0e7 commit 10fe553

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎app/Cargo.toml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ tracing = "0.1"
4141
# VisualCI's own crates, shared with the CLI.
4242
visualci-core = { path = "../crates/visualci-core" }
4343
snapshot-diff = { path = "../crates/snapshot-diff" }
44-
tracing = "0.1"
4544

4645
[dev-dependencies]
4746
regex = "1"

‎app/tests/hosts.rs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ fn in_production() -> laravel::foundation::ApplicationBuilder {
3939
("QUEUE_CONNECTION", "sync"),
4040
("DB_CONNECTION", "pgsql"),
4141
("DATABASE_URL", "postgres://loco:loco@127.0.0.1:55433/visualci_app_test"),
42+
("S3_ENDPOINT", "http://127.0.0.1:59000"),
43+
("S3_BUCKET", "visualci-test"),
44+
("S3_ACCESS_KEY_ID", "visualci"),
45+
("S3_SECRET_ACCESS_KEY", "visualci-dev-secret"),
4246
])
4347
}
4448

@@ -49,6 +53,8 @@ fn production() -> Application {
4953
("VISUALCI_APP_URL", "https://app.visualci.test"),
5054
("VISUALCI_API_URL", "https://api.visualci.test"),
5155
("VISUALCI_MCP_URL", "https://mcp.visualci.test"),
56+
("OAUTH_ISSUER", "https://mcp.visualci.test"),
57+
("OAUTH_AUTHORIZATION_ENDPOINT", "https://app.visualci.test/oauth/authorize"),
5258
])
5359
.create()
5460
}

‎app/tests/sign_in.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ async fn an_mcp_client_finds_the_oauth_server_and_its_consent_page_asks_for_sign
215215
app.get("/.well-known/oauth-authorization-server")
216216
.await
217217
.assert_ok()
218-
.assert_json_path("authorization_endpoint", "http://localhost/oauth/authorize");
218+
.assert_json_path("authorization_endpoint", "https://app.visualci.test/oauth/authorize");
219219
let page = app.get("/oauth/authorize?client_id=x&response_type=code").header("accept", "text/html").await;
220220
page.assert_redirect_to("/login");
221221
app.get("/login").with_cookies_from(&page).await.assert_ok().assert_see("Sign in with GitHub");

0 commit comments

Comments
 (0)