Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow tunnel timeout configuration #896

Merged
merged 4 commits into from
Apr 2, 2024
Merged

feat: allow tunnel timeout configuration #896

merged 4 commits into from
Apr 2, 2024

Conversation

alexplischke
Copy link
Contributor

Description

Make the tunnel readiness timeout configurable via flags and config.

Examples:

❯ saucectl run --tunnel-name meow --tunnel-timeout 10s
14:24:57 INF Running Testcafe in Sauce Labs
14:24:57 INF Performing tunnel readiness check... timeout=10s tunnel=meow
14:25:08 ERR failed to execute run command error="tunnel not found"
❯ saucectl run --tunnel-name meow --tunnel-timeout -3s
14:28:55 INF Running Testcafe in Sauce Labs
14:28:55 ERR failed to execute run command error="tunnel timeout must be greater than 0"

@alexplischke alexplischke added the enhancement New feature or request label Apr 2, 2024
@alexplischke alexplischke marked this pull request as ready for review April 2, 2024 21:48
@alexplischke alexplischke requested a review from a team as a code owner April 2, 2024 21:48
mhan83
mhan83 previously approved these changes Apr 2, 2024
mhan83
mhan83 previously approved these changes Apr 2, 2024
@@ -137,7 +137,14 @@ func FilterSuites(p *Project, suiteName string) error {
// RunProject runs the tests defined in apitest.Project
func (r *Runner) RunProject() (int, error) {
exitCode := 1
if err := tunnel.ValidateTunnel(r.TunnelService, r.Project.Sauce.Tunnel.Name, r.Project.Sauce.Tunnel.Owner, tunnel.V2AlphaFilter, false); err != nil {
if err := tunnel.ValidateTunnel(
Copy link
Contributor

@tianfeng92 tianfeng92 Apr 2, 2024

Choose a reason for hiding this comment

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

hmm... tunnel.ValidateTunnel() or tunnel.Validate()? Maybe tunnel.Validate() is better at this moment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, can be more concise!

@alexplischke alexplischke merged commit 181b20e into main Apr 2, 2024
18 checks passed
@alexplischke alexplischke deleted the DEVX-2838 branch April 2, 2024 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants