MCPcopy Create free account
hub / github.com/devopsctl/gitlabctl / TestDescribeMember

Function TestDescribeMember

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

executeCommandMethod · 0.95
setBasicAuthEnvsFunction · 0.85
printFlagsTableFunction · 0.85

Tested by

no test coverage detected