MCPcopy
hub / github.com/kubernetes/test-infra / Test_options_getLabels

Function Test_options_getLabels

robots/pr-creator/main_test.go:26–134  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

24)
25
26func Test_options_getLabels(t *testing.T) {
27 type fields struct {
28 github flagutil.GitHubOptions
29 branch string
30 allowMods bool
31 confirm bool
32 local bool
33 org string
34 repo string
35 source string
36 title string
37 headBranch string
38 matchTitle string
39 body string
40 labels string
41 }
42 tests := []struct {
43 name string
44 fields fields
45 want []string
46 }{
47 {
48 name: "empty labels",
49 fields: fields{
50 github: flagutil.GitHubOptions{},
51 branch: "",
52 allowMods: false,
53 confirm: false,
54 local: false,
55 org: "",
56 repo: "",
57 source: "",
58 title: "",
59 headBranch: "",
60 matchTitle: "",
61 body: "",
62 labels: "",
63 },
64 want: nil,
65 },
66 {
67 name: "one label",
68 fields: fields{
69 github: flagutil.GitHubOptions{},
70 branch: "",
71 allowMods: false,
72 confirm: false,
73 local: false,
74 org: "",
75 repo: "",
76 source: "",
77 title: "",
78 headBranch: "",
79 matchTitle: "",
80 body: "",
81 labels: "lgtm",
82 },
83 want: []string{

Callers

nothing calls this directly

Calls 2

getLabelsMethod · 0.95
RunMethod · 0.65

Tested by

no test coverage detected