tests: use .test TLD for bare-hostname fixtures#5220
Merged
janniklasrose merged 1 commit intomainfrom May 8, 2026
Merged
Conversation
Follow-up to #5189. The previous sweep replaced real `.com` hosts with `.test`; this catches the bare-hostname variants (`https://foo`, `https://default`, `https://abc`, `https://noneofthehostsmatch`, `https://query/?o=...`) that survived because they didn't match the `.com` filter. The SDK well-known endpoint resolver still treats single-label hosts as real DNS lookups, so these fixtures stall ~3s each on the Windows CI runner. From `test-output.json` of run 25496981743: | Test | linux | windows | |------------------------------------------------|--------|---------| | TestLoaderSkipsExistingAuth | 0.01s | 3.04s | | TestLoaderSkipsExplicitAuthType | 0.01s | 2.79s | | TestLoaderMatchingHostWithQuery | 0.03s | 2.78s | | TestLoaderMatchingHost | 0.00s | 2.76s | | TestLoaderSkipsNonExistingConfigFile | 0.01s | 2.75s | | TestLoaderSkipsNoMatchingHost | 0.01s | 1.27s | | cmd/labs/project: TestRunningCommand | 0.10s | 2.98s | | cmd/labs/project: TestRenderingTable | 0.03s | 2.92s | | cmd/labs/project: TestRunningBlueprintEcho... | 0.01s | 2.76s | Total ~25s per Windows job (×2 with direct + terraform engines). Scope is limited to fixtures that actually trigger the resolver (loader tests + labs project fixture). Other `https://foo`-style strings in `ops_test.go` are in tempdir-only tests that never hit DNS and remain untouched to keep the diff focused. Co-authored-by: Isaac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Rename bare-hostname test fixtures (no TLD) to use
.test:libs/databrickscfg/profile/testdata/databrickscfg—https://default,https://query/?o=1234,https://foolibs/databrickscfg/profile/testdata/sample-home/.databrickscfg—https://defaultlibs/databrickscfg/loader_test.go—Host:fields and themultiple profiles matchederror-message assertionlibs/databrickscfg/ops_test.go— only the two cases that match the renamed shared fixture profilescmd/labs/project/testdata/installed-in-home/.databrickscfg—https://abchttps://accounts.cloud.databricks.comandhttps://spog[-dup].databricks.comin the same files are intentionally left as-is.Why
Follow-up to #5189. That sweep replaced real
.comhosts; this catches the bare-hostname variants the.comfilter missed. The SDK well-known endpoint resolver treats single-label hosts as real DNS lookups, so these fixtures stall ~3s each on the Windows CI runner.From
test-output.jsonof run 25496981743 (win-tf):TestLoaderSkipsExistingAuthTestLoaderSkipsExplicitAuthTypeTestLoaderMatchingHostWithQueryTestLoaderMatchingHostTestLoaderSkipsNonExistingConfigFileTestLoaderSkipsNoMatchingHostcmd/labs/project: TestRunningCommandcmd/labs/project: TestRenderingTablecmd/labs/project: TestRunningBlueprintEchoProfileWrong~25s per Windows job × 2 engines = ~50s expected to come back. Scope is limited to fixtures that actually trigger the resolver. Other
https://foo-style strings inops_test.goare in tempdir-only tests that never hit DNS and remain untouched to keep the diff focused.Tests
go test ./libs/databrickscfg/... ./cmd/labs/project/...passes locally../task fmt,./task checks,./task lintall clean.This PR was written by Claude Code.