Skip to content

Commit afdc6c7

Browse files
corrections
1 parent 27c141a commit afdc6c7

File tree

3 files changed

+23
-33
lines changed

3 files changed

+23
-33
lines changed

src/test/java/org/gitlab4j/api/TestGitLabApiEvents.java

+2-12
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,7 @@
2525
import org.gitlab4j.api.systemhooks.SystemHookManager;
2626
import org.gitlab4j.api.systemhooks.TeamMemberSystemHookEvent;
2727
import org.gitlab4j.api.utils.JacksonJson;
28-
import org.gitlab4j.api.webhook.BuildEvent;
29-
import org.gitlab4j.api.webhook.ChangeContainer;
30-
import org.gitlab4j.api.webhook.Event;
31-
import org.gitlab4j.api.webhook.IssueEvent;
32-
import org.gitlab4j.api.webhook.JobEvent;
33-
import org.gitlab4j.api.webhook.MergeRequestEvent;
34-
import org.gitlab4j.api.webhook.NoteEvent;
35-
import org.gitlab4j.api.webhook.PipelineEvent;
36-
import org.gitlab4j.api.webhook.PushEvent;
37-
import org.gitlab4j.api.webhook.TagPushEvent;
38-
import org.gitlab4j.api.webhook.WikiPageEvent;
28+
import org.gitlab4j.api.webhook.*;
3929
import org.junit.jupiter.api.AfterAll;
4030
import org.junit.jupiter.api.BeforeAll;
4131
import org.junit.jupiter.api.Test;
@@ -67,7 +57,7 @@ public static void teardown() {
6757

6858
@Test
6959
public void testDeploymentEvent() throws Exception {
70-
Event event = unmarshalResource(PipelineEvent.class, "deployment-event.json");
60+
Event event = unmarshalResource(DeploymentEvent.class, "deployment-event.json");
7161
assertTrue(compareJson(event, "deployment-event.json"));
7262
}
7363

Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
{
2-
"object_kind": "deployment",
3-
"status": "success",
4-
"status_changed_at":"2021-04-28 21:50:00 +0200",
2+
"commit_title": "Add new file",
3+
"commit_url": "http://10.126.0.2:3000/root/test-deployment-webhooks/-/commit/279484c09fbe69ededfced8c1bb6e6d24616b468",
4+
"deployment_id": 15,
55
"deployable_id": 796,
66
"deployable_url": "http://10.126.0.2:3000/root/test-deployment-webhooks/-/jobs/796",
77
"environment": "staging",
8+
"object_kind": "deployment",
89
"project": {
9-
"id": 30,
10-
"name": "test-deployment-webhooks",
10+
"ci_config_path": "",
11+
"default_branch": "master",
1112
"description": "",
12-
"web_url": "http://10.126.0.2:3000/root/test-deployment-webhooks",
13-
"avatar_url": null,
14-
"git_ssh_url": "ssh://[email protected]:2222/root/test-deployment-webhooks.git",
1513
"git_http_url": "http://10.126.0.2:3000/root/test-deployment-webhooks.git",
14+
"git_ssh_url": "ssh://[email protected]:2222/root/test-deployment-webhooks.git",
15+
"homepage": "http://10.126.0.2:3000/root/test-deployment-webhooks",
16+
"http_url": "http://10.126.0.2:3000/root/test-deployment-webhooks.git",
17+
"id": 30,
18+
"name": "test-deployment-webhooks",
1619
"namespace": "Administrator",
17-
"visibility_level": 0,
1820
"path_with_namespace": "root/test-deployment-webhooks",
19-
"default_branch": "master",
20-
"ci_config_path": "",
21-
"homepage": "http://10.126.0.2:3000/root/test-deployment-webhooks",
22-
"url": "ssh://[email protected]:2222/root/test-deployment-webhooks.git",
2321
"ssh_url": "ssh://[email protected]:2222/root/test-deployment-webhooks.git",
24-
"http_url": "http://10.126.0.2:3000/root/test-deployment-webhooks.git"
22+
"url": "ssh://[email protected]:2222/root/test-deployment-webhooks.git",
23+
"visibility_level": 0,
24+
"web_url": "http://10.126.0.2:3000/root/test-deployment-webhooks"
2525
},
2626
"short_sha": "279484c0",
27+
"status": "success",
28+
"status_changed_at": "2021-04-28 21:50:00 +0200",
2729
"user": {
30+
"avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
31+
"email": "[email protected]",
2832
"id": 1,
2933
"name": "Administrator",
30-
"username": "root",
31-
"avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
32-
"email": "[email protected]"
34+
"username": "root"
3335
},
34-
"user_url": "http://10.126.0.2:3000/root",
35-
"commit_url": "http://10.126.0.2:3000/root/test-deployment-webhooks/-/commit/279484c09fbe69ededfced8c1bb6e6d24616b468",
36-
"commit_title": "Add new file"
36+
"user_url": "http://10.126.0.2:3000/root"
3737
}

src/test/resources/org/gitlab4j/api/environment.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"external_url": "https://review-fix-foo-dfjre3.example.gitlab.com",
66
"state": "available",
77
"tier": "testing",
8-
"auto_stop_at": "2024-11-27T13:34:49.812+01:00",
8+
"auto_stop_at": "2024-11-27T13:34:49.812Z",
99
"last_deployment": {
1010
"id": 100,
1111
"iid": 34,

0 commit comments

Comments
 (0)