MCPcopy Index your code
hub / github.com/devopsctl/gitlabctl / TestGetMembers

Function TestGetMembers

cmd/get_members_test.go:29–118  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

27)
28
29func TestGetMembers(t *testing.T) {
30 tt := []struct {
31 name string
32 flagsMap map[string]string
33 expect testResult
34 expectOut string
35 }{
36 {
37 name: "from project print in yaml",
38 flagsMap: map[string]string{
39 "out": "yaml",
40 "from-project": "Group1/Project1",
41 "query": "amelia",
42 },
43 expect: pass,
44 },
45 {
46 name: "from project print in json",
47 flagsMap: map[string]string{
48 "out": "json",
49 "from-project": "Group1/Project1",
50 },
51 expect: pass,
52 },
53 {
54 name: "from project print in table",
55 flagsMap: map[string]string{
56 "from-project": "Group1/Project1",
57 },
58 expect: pass,
59 },
60 {
61 name: "from group print in yaml",
62 flagsMap: map[string]string{
63 "out": "yaml",
64 "from-group": "Group2",
65 "query": "amelia",
66 },
67 expect: pass,
68 },
69 {
70 name: "from group print in json",
71 flagsMap: map[string]string{
72 "out": "json",
73 "from-group": "Group2",
74 },
75 expect: pass,
76 },
77 {
78 name: "from group print in table",
79 flagsMap: map[string]string{
80 "from-group": "Group2",
81 },
82 expect: pass,
83 },
84 {
85 name: "nothing is passed should fail",
86 expect: fail,

Callers

nothing calls this directly

Calls 3

executeCommandMethod · 0.95
tInfoFunction · 0.85
printFlagsTableFunction · 0.85

Tested by

no test coverage detected