Skip to content

Commit 3a33fd4

Browse files
committed
Add a skipped system test to exercise the new logic.
Skipped until negative system tests are possible.
1 parent d4d5a58 commit 3a33fd4

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

packages/o365/_dev/deploy/docker/config.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,21 @@ rules:
6666
- "application/json"
6767
body: |-
6868
{"contentType": "Audit.General","status": "enabled","webhook": null}
69+
- path: /api/v1.0/test-cel-tenant-id/activity/feed/subscriptions/start
70+
methods: [POST]
71+
query_params:
72+
contentType: "Audit.TypeRequiringAdditionalPermissions"
73+
PublisherIdentifier: test-cel-tenant-id
74+
request_headers:
75+
Authorization:
76+
- "Bearer CELtoken"
77+
responses:
78+
- status_code: 401
79+
headers:
80+
Content-Type:
81+
- "application/json"
82+
body: |-
83+
{"error":{"code":"AF10001","message":"The permission set (...) sent in the request does not include the expected permission."}}
6984
- path: /api/v1.0/test-cel-tenant-id/activity/feed/subscriptions/content
7085
methods: [GET]
7186
query_params:
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
input: cel
2+
service: o365-cel
3+
vars: ~
4+
policy_template: o365
5+
data_stream:
6+
vars:
7+
url: http://{{Hostname}}:{{Port}}
8+
token_url: http://{{Hostname}}:{{Port}}
9+
preserve_original_event: true
10+
client_id: test-cel-client-id
11+
client_secret: test-cel-client-secret
12+
azure_tenant_id: test-cel-tenant-id
13+
content_types: "Audit.SharePoint, Audit.TypeRequiringAdditionalPermissions, Audit.General"
14+
initial_interval: 12h
15+
enable_request_tracer: true
16+
assert:
17+
hit_count: 1
18+
skip:
19+
reason: "Negative testing in system tests is not currently possible"
20+
link: https://github.com/elastic/elastic-package/issues/2800

0 commit comments

Comments
 (0)