MCPcopy Create free account
hub / github.com/github/gh-aw / TestValidateWorkflowName_Integration

Function TestValidateWorkflowName_Integration

pkg/cli/interactive_test.go:15–82  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

13)
14
15func TestValidateWorkflowName_Integration(t *testing.T) {
16 tests := []struct {
17 name string
18 input string
19 expectError bool
20 }{
21 {
22 name: "valid simple name",
23 input: "my-workflow",
24 expectError: false,
25 },
26 {
27 name: "valid with underscores",
28 input: "my_workflow",
29 expectError: false,
30 },
31 {
32 name: "valid alphanumeric",
33 input: "workflow123",
34 expectError: false,
35 },
36 {
37 name: "valid mixed",
38 input: "my-workflow_v2",
39 expectError: false,
40 },
41 {
42 name: "invalid with spaces",
43 input: "my workflow",
44 expectError: true,
45 },
46 {
47 name: "invalid with special chars",
48 input: "my@workflow!",
49 expectError: true,
50 },
51 {
52 name: "invalid with dots",
53 input: "my.workflow",
54 expectError: true,
55 },
56 {
57 name: "invalid with slashes",
58 input: "my/workflow",
59 expectError: true,
60 },
61 {
62 name: "empty string",
63 input: "",
64 expectError: true,
65 },
66 {
67 name: "valid uppercase",
68 input: "MyWorkflow",
69 expectError: false,
70 },
71 }
72

Callers

nothing calls this directly

Calls 3

ValidateWorkflowNameFunction · 0.85
RunMethod · 0.45
ErrorfMethod · 0.45

Tested by

no test coverage detected