(t *testing.T)
| 70 | } |
| 71 | |
| 72 | func TestQueryUser(t *testing.T) { |
| 73 | u := test.CreateUser() |
| 74 | t.Cleanup(func() { |
| 75 | test.DeleteUser(u) |
| 76 | }) |
| 77 | cmd := test.GetRootCmdWithSubCommands(NewCmds()...) |
| 78 | cmd.SetArgs([]string{"query-users", "-f", "{\"id\": \"" + u + "\"}"}) |
| 79 | _, err := cmd.ExecuteC() |
| 80 | require.NoError(t, err) |
| 81 | require.Contains(t, cmd.OutOrStdout().(*bytes.Buffer).String(), u) |
| 82 | } |
| 83 | |
| 84 | func TestRevokeToken(t *testing.T) { |
| 85 | u := test.CreateUser() |
nothing calls this directly
no test coverage detected