(t *testing.T)
| 27 | ) |
| 28 | |
| 29 | func 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, |
nothing calls this directly
no test coverage detected