Skip to content

Commit 5ae0ed4

Browse files
committed
Run all the integration tests - 2023-09-25 PT
1 parent 26478c1 commit 5ae0ed4

File tree

10 files changed

+69
-6
lines changed

10 files changed

+69
-6
lines changed

json-logs/raw/audit/v1/actions.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,11 @@
293293
"app_datastore_updated",
294294
"app_datastore_deleted",
295295
"app_collaborator_added",
296-
"app_collaborator_removed"
296+
"app_collaborator_removed",
297+
"app_deleted",
298+
"app_variable_added",
299+
"app_variable_removed",
300+
"app_deployed"
297301
],
298302
"workflow_builder": [
299303
"workflow_created",
@@ -393,6 +397,11 @@
393397
"canvas_shared",
394398
"canvas_tombstoned",
395399
"canvas_unshared"
400+
],
401+
"function": [
402+
"function_distribution_permission_added",
403+
"function_distribution_permission_removed",
404+
"function_distribution_permission_set"
396405
]
397406
}
398407
}

json-logs/raw/audit/v1/schemas.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,15 @@
120120
"updated_by": "string",
121121
"step_configuration": "vec\u003cdict\u003cstring, mixed\u003e\u003e"
122122
}
123+
},
124+
{
125+
"type": "app",
126+
"app": {
127+
"id": "string",
128+
"app_id": "string",
129+
"distribution_type": "string",
130+
"user_ids": "array"
131+
}
123132
}
124133
]
125134
}

json-logs/samples/audit/v1/actions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@
5050
],
5151
"canvas": [
5252
""
53+
],
54+
"function": [
55+
""
5356
]
5457
},
5558
"ok": false,

json-logs/samples/audit/v1/logs.json

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,15 @@
103103
"restricted_subjects": [
104104
""
105105
]
106+
},
107+
"workflow_v2": {
108+
"id": "",
109+
"app_id": "",
110+
"date_updated": 123,
111+
"callback_id": "",
112+
"name": "",
113+
"updated_by": "",
114+
"step_configuration": []
106115
}
107116
},
108117
"context": {
@@ -276,7 +285,8 @@
276285
},
277286
"url_private": "",
278287
"shared_with": {
279-
"channel_id": ""
288+
"channel_id": "",
289+
"access_level": ""
280290
},
281291
"initiated_by": "",
282292
"source_team": "",
@@ -338,7 +348,11 @@
338348
"target_entity_id": "",
339349
"changed_permissions": [],
340350
"datastore_name": "",
341-
"attributes": []
351+
"attributes": [],
352+
"channel": "",
353+
"entity_type": "",
354+
"actor": "",
355+
"access_level": ""
342356
}
343357
}
344358
]

json-logs/samples/audit/v1/schemas.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@
3838
"is_distributed": "",
3939
"is_directory_approved": "",
4040
"is_workflow_app": "",
41-
"scopes": ""
41+
"scopes": "",
42+
"app_id": "",
43+
"distribution_type": "",
44+
"user_ids": ""
4245
},
4346
"workflow": {
4447
"id": "",

slack-api-client/src/main/java/com/slack/api/audit/Actions.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,10 @@ private App() {
321321
public static final String app_allowlist_rule_matched = "app_allowlist_rule_matched";
322322
public static final String app_collaborator_added = "app_collaborator_added";
323323
public static final String app_collaborator_removed = "app_collaborator_removed";
324+
public static final String app_deleted = "app_deleted";
325+
public static final String app_variable_added = "app_variable_added";
326+
public static final String app_variable_removed = "app_variable_removed";
327+
public static final String app_deployed = "app_deployed";
324328
}
325329

326330
public static class Message {
@@ -470,4 +474,13 @@ private Canvas() {
470474
public static final String canvas_tombstoned = "canvas_tombstoned";
471475
public static final String canvas_unshared = "canvas_unshared";
472476
}
477+
478+
public static class Function {
479+
private Function() {
480+
}
481+
482+
public static final String function_distribution_permission_added = "function_distribution_permission_added";
483+
public static final String function_distribution_permission_removed = "function_distribution_permission_removed";
484+
public static final String function_distribution_permission_set = "function_distribution_permission_set";
485+
}
473486
}

slack-api-client/src/main/java/com/slack/api/audit/response/ActionsResponse.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,6 @@ public static class Actions {
4040
private List<String> appApprovalAutomationRule;
4141
private List<String> workflowV2;
4242
private List<String> canvas;
43+
private List<String> function;
4344
}
4445
}

slack-api-client/src/main/java/com/slack/api/audit/response/SchemasResponse.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,14 @@ public static class Channel {
8787
@Data
8888
public static class App {
8989
private String id;
90+
private String appId;
9091
private String name;
9192
private String isWorkflowApp;
9293
private String isDistributed;
9394
private String isDirectoryApproved;
9495
private String scopes;
96+
private String distributionType;
97+
private String userIds;
9598
}
9699

97100
@Data

slack-api-client/src/test/java/test_with_remote_apis/audit/ApiTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,12 @@ public void getActions_detectingNewOnes() throws IOException, AuditApiException
257257
fail("Unknown action detected - " + action);
258258
}
259259
}
260+
List<String> functionNames = getAllPublicStaticFieldValues(Actions.Function.class);
261+
for (String action : actions.getFunction()) {
262+
if (!functionNames.contains(action)) {
263+
fail("Unknown action detected - " + action);
264+
}
265+
}
260266
}
261267

262268
@Test

slack-api-client/src/test/java/test_with_remote_apis/methods_admin_api/AdminApi_workflows_Test.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public void adminWorkflowsCollaborators() throws Exception {
4242
AdminWorkflowsSearchResponse searchResult = methodsAsync.adminWorkflowsSearch(r -> r
4343
.limit(30)
4444
).get();
45+
// 2023-09-26: the server side returns "internal_error"
4546
assertThat(searchResult.getError(), is(nullValue()));
4647

4748
// TODO: make this more stable
@@ -67,6 +68,7 @@ public void adminWorkflowsPermissions() throws Exception {
6768
AdminWorkflowsSearchResponse searchResult = methodsAsync.adminWorkflowsSearch(r -> r
6869
.limit(30)
6970
).get();
71+
// 2023-09-26: the server side returns "internal_error"
7072
assertThat(searchResult.getError(), is(nullValue()));
7173

7274
AdminWorkflowsPermissionsLookupResponse result = methodsAsync.adminWorkflowsPermissionsLookup(r -> r
@@ -80,10 +82,10 @@ public void adminWorkflowsPermissions() throws Exception {
8082
@Test
8183
public void adminWorkflowsUnpublish() throws Exception {
8284
if (orgAdminUserToken != null) {
83-
AdminWorkflowsUnpublishResponse searchResult = methodsAsync.adminWorkflowsUnpublish(r -> r
85+
AdminWorkflowsUnpublishResponse result = methodsAsync.adminWorkflowsUnpublish(r -> r
8486
.workflowIds(Arrays.asList("W111111"))
8587
).get();
86-
assertThat(searchResult.getError(), is("invalid_arguments"));
88+
assertThat(result.getError(), is("invalid_arguments"));
8789
}
8890
}
8991
}

0 commit comments

Comments
 (0)