Commit 855b13b
committed
fix(tests): adapt tests for windows CI runner
Two failure modes surfaced only after windows-latest joined the test
matrix:
1. apply_test.go::TestResolveTemplatePaths/path_outside_rootDir_is_kept_as-is
hardcoded /other/project/templates/controlplane.yaml as the
outside-root input. That string is absolute on POSIX but not on
Windows (no drive letter), so the resolver treated it as relative,
joined it with tmpRoot, and produced 'other/project/...' instead of
keeping it as-is. Construct the absolute path via
filepath.VolumeName + filepath.Separator so it is absolute on both
OSes, and expect filepath.ToSlash(absOutside) as the normalized
result.
2. DACL assertions in secureperm_windows_test.go and
template_windows_test.go used strings.Contains(sddl, fullSid) to
verify the trustee. On GitHub Actions windows-latest the runner's
RID-500 admin account is emitted as the SDDL alias 'LA' rather than
the literal SID, so the substring check failed. Extract the ACE
trustee via regex and resolve it through windows.StringToSid (which
accepts both literal SIDs and well-known aliases), then compare
against the current user SID with windows.EqualSid.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>1 parent 8d4d0a0 commit 855b13b
3 files changed
Lines changed: 86 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
99 | 105 | | |
100 | 106 | | |
101 | 107 | | |
| |||
127 | 133 | | |
128 | 134 | | |
129 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
130 | 140 | | |
131 | | - | |
| 141 | + | |
132 | 142 | | |
133 | | - | |
| 143 | + | |
134 | 144 | | |
135 | 145 | | |
136 | 146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
122 | | - | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
131 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
132 | 152 | | |
133 | 153 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
30 | 77 | | |
31 | 78 | | |
32 | 79 | | |
| |||
58 | 105 | | |
59 | 106 | | |
60 | 107 | | |
61 | | - | |
62 | 108 | | |
63 | 109 | | |
64 | 110 | | |
65 | 111 | | |
66 | 112 | | |
67 | 113 | | |
68 | 114 | | |
69 | | - | |
70 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
71 | 118 | | |
| 119 | + | |
72 | 120 | | |
73 | 121 | | |
74 | 122 | | |
| |||
0 commit comments