(t *testing.T)
| 89 | } |
| 90 | |
| 91 | func TestListCertificationTargetsCommand(t *testing.T) { |
| 92 | var ( |
| 93 | response orchestrator.ListCertificationTargetsResponse |
| 94 | svc *service_orchestrator.Service |
| 95 | |
| 96 | err error |
| 97 | b bytes.Buffer |
| 98 | ) |
| 99 | |
| 100 | svc = service_orchestrator.NewService() |
| 101 | _, err = clitest.RunCLITestFunc(func() bool { |
| 102 | _, err = svc.CreateDefaultCertificationTarget() |
| 103 | assert.NoError(t, err) |
| 104 | |
| 105 | cli.Output = &b |
| 106 | |
| 107 | cmd := NewListCertificationTargetsCommand() |
| 108 | err = cmd.RunE(nil, []string{}) |
| 109 | |
| 110 | assert.NoError(t, err) |
| 111 | |
| 112 | err = protojson.Unmarshal(b.Bytes(), &response) |
| 113 | |
| 114 | assert.NoError(t, err) |
| 115 | return assert.NotEmpty(t, response.Targets) |
| 116 | }, server.WithServices(svc)) |
| 117 | assert.NoError(t, err) |
| 118 | } |
| 119 | |
| 120 | func TestGetCertificationTargetCommand(t *testing.T) { |
| 121 | var ( |
nothing calls this directly
no test coverage detected