-
Notifications
You must be signed in to change notification settings - Fork 18
/
team_test.go
45 lines (35 loc) · 919 Bytes
/
team_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package runscope
import (
"testing"
)
func TestListIntegration(t *testing.T) {
testPreCheck(t)
client := clientConfigure()
integrations, err := client.ListIntegrations(teamID)
if err != nil {
t.Error(err)
}
if len(integrations) <= 0 {
t.Errorf("Expected some integrations got %d", len(integrations))
}
if len(integrations[0].ID) <= 0 {
t.Errorf("Expected ID got %s", integrations[0].ID)
}
if len(integrations[0].IntegrationType) <= 0 {
t.Errorf("Expected integration type got %s", integrations[0].IntegrationType)
}
if len(integrations[0].Description) <= 0 {
t.Errorf("Expected description got %s", integrations[0].Description)
}
if len(integrations[0].UUID) <= 0 {
t.Errorf("Expected UUID got %s", integrations[0].UUID)
}
}
func TestListAgents(t *testing.T) {
testPreCheck(t)
client := clientConfigure()
_, err := client.ListAgents(teamID)
if err != nil {
t.Error(err)
}
}