Commit a7eed65
committed
feat: add manual test workflow for CLI authentication
Add semi-automated testing workflow for project use tests that require
human browser-based authentication. These tests ensure the --local flag
works correctly with CLI key authentication.
Implementation:
- Created project_use_manual_test.go with 4 manual tests (build tag: manual)
- Added RequireCLIAuthentication() helper that forces fresh login
- Helper clears existing auth, runs 'hookdeck login', waits for user
- Existing automated tests remain in project_use_test.go (run in CI)
- Manual tests only run with: go test -tags=manual
Testing workflow:
- Tests clear authentication and require fresh CLI login
- User completes browser authentication when prompted
- Tests verify local config creation with project selection
- Validates security warnings and smart default behavior
Documentation:
- Updated test/acceptance/README.md with manual test instructions
- Explained difference between automated (CI) and manual tests
- Provided examples of running manual tests locally
- Documented which tests require human authentication
Feature implementation:
- Added security warning output in project_use.go for new local configs
- Fixed config writing logic in config.go to properly handle new files
- Refactored project_use_test.go to separate automated vs manual tests
- Updated test comments to clarify CI vs local execution requirements
Related: Completes semi-automated testing for --local flag feature1 parent a81a219 commit a7eed65
File tree
6 files changed
+576
-171
lines changed- pkg
- cmd
- config
- test/acceptance
6 files changed
+576
-171
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
246 | 250 | | |
247 | 251 | | |
248 | 252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
209 | 208 | | |
210 | | - | |
211 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
212 | 214 | | |
213 | 215 | | |
214 | 216 | | |
215 | 217 | | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
223 | 221 | | |
224 | 222 | | |
225 | 223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
5 | 21 | | |
6 | 22 | | |
7 | 23 | | |
| |||
21 | 37 | | |
22 | 38 | | |
23 | 39 | | |
24 | | - | |
| 40 | + | |
25 | 41 | | |
26 | 42 | | |
27 | 43 | | |
28 | 44 | | |
29 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
30 | 51 | | |
31 | | - | |
| 52 | + | |
32 | 53 | | |
33 | 54 | | |
34 | 55 | | |
| |||
38 | 59 | | |
39 | 60 | | |
40 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
41 | 137 | | |
42 | 138 | | |
43 | 139 | | |
44 | 140 | | |
45 | 141 | | |
46 | 142 | | |
| 143 | + | |
| 144 | + | |
47 | 145 | | |
48 | 146 | | |
49 | 147 | | |
| |||
65 | 163 | | |
66 | 164 | | |
67 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
68 | 176 | | |
69 | 177 | | |
70 | 178 | | |
| |||
0 commit comments