Skip to content

Copy port from headless test server when using WASM_BINDGEN_TEST_ADDRESS#3873

Merged
daxpedda merged 19 commits intowasm-bindgen:mainfrom
lynn:headless-copy-port
Mar 6, 2024
Merged

Copy port from headless test server when using WASM_BINDGEN_TEST_ADDRESS#3873
daxpedda merged 19 commits intowasm-bindgen:mainfrom
lynn:headless-copy-port

Conversation

@lynn
Copy link
Copy Markdown
Contributor

@lynn lynn commented Mar 5, 2024

When putting #3861 to practice, I realized that it's a bit hard to use, because the headless test server might open on a different port every time. It's better to copy the port from the server when it isn't specified. So for example when it happens to open on 127.0.0.1:23456 and WASM_BINDGEN_TEST_ADDRESS is set to http://localhost.mydomain.org we should connect to http://localhost.mydomain.org:23456 in the test runner (not the default port 80).

Comment thread crates/cli-support/src/js/mod.rs Outdated
Comment thread crates/cli/src/bin/wasm-bindgen-test-runner/headless.rs Outdated
Comment thread crates/cli/src/bin/wasm-bindgen-test-runner/headless.rs Outdated
Comment thread crates/cli-support/src/js/mod.rs Outdated
Comment thread crates/cli/src/bin/wasm-bindgen-test-runner/headless.rs Outdated
Copy link
Copy Markdown
Member

@daxpedda daxpedda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants