MCPcopy Create free account
hub / github.com/google/go-github / TestOrganizationService_GetAuditLog

Function TestOrganizationService_GetAuditLog

github/orgs_audit_log_test.go:15–167  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

13)
14
15func TestOrganizationService_GetAuditLog(t *testing.T) {
16 t.Parallel()
17 client, mux, _ := setup(t)
18
19 mux.HandleFunc("/orgs/o/audit-log", func(w http.ResponseWriter, r *http.Request) {
20 testMethod(t, r, "GET")
21 testFormValues(t, r, values{"include": "all", "phrase": "action:workflows", "order": "asc"})
22
23 fmt.Fprint(w, `[
24 {
25 "@timestamp": 1615077308538,
26 "_document_id": "beeZYapIUe-wKg5-beadb33",
27 "action": "workflows.completed_workflow_run",
28 "active": true,
29 "actor": "testactor",
30 "actor_ip": "10.0.0.1",
31 "actor_location": {
32 "country_code": "US"
33 },
34 "cancelled_at": "2021-03-07T00:35:08.000Z",
35 "completed_at": "2021-03-07T00:35:08.000Z",
36 "conclusion": "success",
37 "config": {
38 "content_type": "json",
39 "insecure_ssl": "0",
40 "url": "https://example.com/deadbeef-new-hook"
41 },
42 "created_at": 1615077308538,
43 "event": "schedule",
44 "events": ["code_scanning_alert"],
45 "hashed_token": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
46 "head_branch": "master",
47 "head_sha": "5acdeadbeef64d1a62388e901e5cdc9358644b37",
48 "job_workflow_ref": "testorg/testrepo/.github/workflows/testjob.yml@refs/pull/1/merge",
49 "name": "Code scanning - action",
50 "oauth_application_id": 1,
51 "old_permission": "read",
52 "org": "o",
53 "org_id": 1,
54 "overridden_codes": [
55 "review_policy_not_satisfied"
56 ],
57 "permission": "admin",
58 "pull_request_id": 1,
59 "pull_request_title": "a pr title",
60 "pull_request_url": "https://github.com/testorg/testrepo/pull/1",
61 "reasons": [
62 {
63 "code": "a code",
64 "message": "a message"
65 }
66 ],
67 "programmatic_access_type": "GitHub App server-to-server token",
68 "referrer": "a referrer",
69 "repo": "o/blue-crayon-1",
70 "run_attempt": 1,
71 "run_number": 1,
72 "started_at": "2021-03-07T00:33:04.000Z",

Callers

nothing calls this directly

Calls 8

testMethodFunction · 0.85
testFormValuesFunction · 0.85
assertNoDiffFunction · 0.85
testBadOptionsFunction · 0.85
setupFunction · 0.70
PtrFunction · 0.70
GetAuditLogMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…