...
1
2
3
4
5
6
7
8
9 package integration
10
11 import (
12 "context"
13 "testing"
14 )
15
16
17
18
19 func TestOrganizationAuditLog(t *testing.T) {
20 org := "example_org"
21 entries, _, err := client.Organizations.GetAuditLog(context.Background(), org, nil)
22 if err != nil {
23 t.Fatalf("Organizations.GetAuditLog returned error: %v", err)
24 }
25
26 if len(entries) == 0 {
27 t.Errorf("No AuditLog events returned for org")
28 }
29
30 for _, e := range entries {
31 t.Log(e.GetAction(), e.GetActor(), e.GetTimestamp(), e.GetUser(), e.GetActive())
32 }
33 }
34
View as plain text