(t *testing.T)
| 152 | } |
| 153 | |
| 154 | func TestValidateWorkflowName_EdgeCases(t *testing.T) { |
| 155 | tests := []struct { |
| 156 | name string |
| 157 | input string |
| 158 | expectError bool |
| 159 | }{ |
| 160 | { |
| 161 | name: "single character", |
| 162 | input: "a", |
| 163 | expectError: false, |
| 164 | }, |
| 165 | { |
| 166 | name: "single number", |
| 167 | input: "1", |
| 168 | expectError: false, |
| 169 | }, |
| 170 | { |
| 171 | name: "single hyphen", |
| 172 | input: "-", |
| 173 | expectError: false, |
| 174 | }, |
| 175 | { |
| 176 | name: "single underscore", |
| 177 | input: "_", |
| 178 | expectError: false, |
| 179 | }, |
| 180 | { |
| 181 | name: "very long valid name", |
| 182 | input: strings.Repeat("a", 100), |
| 183 | expectError: false, |
| 184 | }, |
| 185 | { |
| 186 | name: "starts with hyphen", |
| 187 | input: "-workflow", |
| 188 | expectError: false, |
| 189 | }, |
| 190 | { |
| 191 | name: "ends with hyphen", |
| 192 | input: "workflow-", |
| 193 | expectError: false, |
| 194 | }, |
| 195 | { |
| 196 | name: "starts with underscore", |
| 197 | input: "_workflow", |
| 198 | expectError: false, |
| 199 | }, |
| 200 | { |
| 201 | name: "ends with underscore", |
| 202 | input: "workflow_", |
| 203 | expectError: false, |
| 204 | }, |
| 205 | { |
| 206 | name: "starts with number", |
| 207 | input: "123workflow", |
| 208 | expectError: false, |
| 209 | }, |
| 210 | { |
| 211 | name: "multiple consecutive hyphens", |
nothing calls this directly
no test coverage detected