Commit e4a77e1
authored
tests: use .test TLD for bare-hostname fixtures (#5220)
## Changes
Rename bare-hostname test fixtures (no TLD) to use `.test`:
- `libs/databrickscfg/profile/testdata/databrickscfg` —
`https://default`, `https://query/?o=1234`, `https://foo`
- `libs/databrickscfg/profile/testdata/sample-home/.databrickscfg` —
`https://default`
- `libs/databrickscfg/loader_test.go` — `Host:` fields and the `multiple
profiles matched` error-message assertion
- `libs/databrickscfg/ops_test.go` — only the two cases that match the
renamed shared fixture profiles
- `cmd/labs/project/testdata/installed-in-home/.databrickscfg` —
`https://abc`
`https://accounts.cloud.databricks.com` and
`https://spog[-dup].databricks.com` in the same files are intentionally
left as-is.
## Why
Follow-up to #5189. That sweep replaced real `.com` hosts; this catches
the bare-hostname variants the `.com` filter 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.json` of run 25496981743 (win-tf):
| 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: TestRunningBlueprintEchoProfileWrong` | 0.01s |
2.76s |
~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 in `ops_test.go` are 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 lint` all clean.
- Watch the Windows-tf job duration on this PR — expect ~25–50s
improvement.
_This PR was written by Claude Code._1 parent 83efe60 commit e4a77e1
5 files changed
Lines changed: 20 additions & 20 deletions
File tree
- cmd/labs/project/testdata/installed-in-home
- libs/databrickscfg
- profile/testdata
- sample-home
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
0 commit comments