Skip to content

Commit b17a830

Browse files
Update frontend tests to use Eiffel events from Agen edition (#202)
Updated json structure for subscriptions, evens and rules used in tests
1 parent e856184 commit b17a830

22 files changed

+262
-318
lines changed

src/functionaltest/resources/responses/AggregatedObjectResponse.json

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
[
2-
{
1+
[
2+
{
33
"_id":"df4cdb42-1580-4cff-b97a-4d0faa9b2b22_ARTIFACT_TEST",
4-
"aggregatedObject":{
5-
"fileInformation":[
6-
{
4+
"aggregatedObject":{
5+
"fileInformation":[
6+
{
77
"extension":"war",
88
"classifier":""
99
}
1010
],
1111
"buildCommand":"trigger",
12-
"confidenceLevels":[
13-
{
12+
"confidenceLevels":[
13+
{
1414
"eventId":"e3be0cf8-2ebd-4d6d-bf5c-a3b535cd084e_ARTIFACT_TEST",
1515
"name":"dummy_1_stable",
1616
"time":1521452400324,
@@ -21,16 +21,12 @@
2121
"id":"df4cdb42-1580-4cff-b97a-4d0faa9b2b22_ARTIFACT_TEST",
2222
"time":1521452368194,
2323
"type":"EiffelArtifactCreatedEvent",
24-
"gav":{
25-
"groupId":"someGroup",
26-
"artifactId":"someArtifact",
27-
"version":"someVersion"
28-
},
29-
"publications":[
30-
{
24+
"identity": "pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0",
25+
"publications":[
26+
{
3127
"eventId":"2acd348d-05e6-4945-b441-dc7c1e55534e_ARTIFACT_TEST",
32-
"locations":[
33-
{
28+
"locations":[
29+
{
3430
"type":"NEXUS",
3531
"uri":"http://host:port/path"
3632
}

src/functionaltest/resources/responses/DefaultInstanceSubscriptionResponse.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
{
1717
"conditions":[
1818
{
19-
"jmespath":"gav.groupId=='com.othercompany.library'"
19+
"jmespath":"identity=='pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0'"
2020
}
2121
]
2222
}

src/functionaltest/resources/responses/EventsTemplateObject.json

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,14 @@
33
"meta": {
44
"id": "df4cdb42-1580-4cff-b97a-4d0faa9b2b22",
55
"type": "EiffelArtifactCreatedEvent",
6-
"version": "1.1.0",
6+
"version": "3.0.0",
77
"time": 1521452368194,
88
"tags": [],
99
"source": {
1010
"domainId": "someDomain",
1111
"host": "someHost",
1212
"name": "someName",
13-
"serializer": {
14-
"groupId": "com.github.Ericsson",
15-
"artifactId": "eiffel-remrem-semantics",
16-
"version": "0.0.10"
17-
},
13+
"serializer": "pkg:maven/com.mycompany.tools/eiffel-serializer@1.0.3",
1814
"uri": "http://host:port/path"
1915
},
2016
"security": {
@@ -25,11 +21,7 @@
2521
}
2622
},
2723
"data": {
28-
"gav": {
29-
"groupId": "someGroup",
30-
"artifactId": "someArtifact",
31-
"version": "someVersion"
32-
},
24+
"identity": "pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0",
3325
"fileInformation": [
3426
{
3527
"classifier": "",
@@ -38,13 +30,7 @@
3830
],
3931
"buildCommand": "trigger",
4032
"requiresImplementation": "NONE",
41-
"dependsOn": [
42-
{
43-
"groupId": "",
44-
"artifactId": "",
45-
"version": ""
46-
}
47-
],
33+
"dependsOn": ["pkg:maven/com.mycompany.myproduct/my-interface@%5B1.0%2C2.0%29"],
4834
"implements": [],
4935
"name": "event",
5036
"customData": []
@@ -60,18 +46,14 @@
6046
"meta": {
6147
"id": "e3be0cf8-2ebd-4d6d-bf5c-a3b535cd084e",
6248
"type": "EiffelConfidenceLevelModifiedEvent",
63-
"version": "1.1.0",
49+
"version": "3.0.0",
6450
"time": 1521452400324,
6551
"tags": [],
6652
"source": {
6753
"domainId": "someDomain",
6854
"host": "someHost",
6955
"name": "someName",
70-
"serializer": {
71-
"groupId": "com.github.Ericsson",
72-
"artifactId": "eiffel-remrem-semantics",
73-
"version": "0.0.10"
74-
},
56+
"serializer": "pkg:maven/com.mycompany.tools/eiffel-serializer@1.0.3",
7557
"uri": "http://host:port/path"
7658
},
7759
"security": {
@@ -103,17 +85,13 @@
10385
"meta": {
10486
"id": "2acd348d-05e6-4945-b441-dc7c1e55534e",
10587
"type": "EiffelArtifactPublishedEvent",
106-
"version": "1.1.0",
88+
"version": "3.0.0",
10789
"time": 1521452368758,
10890
"tags": [],
10991
"source": {
11092
"domainId": "someDomain",
11193
"name": "someName",
112-
"serializer": {
113-
"groupId": "com.github.Ericsson",
114-
"artifactId": "eiffel-remrem-semantics",
115-
"version": "0.0.10"
116-
}
94+
"serializer": "pkg:maven/com.mycompany.tools/eiffel-serializer@1.0.3"
11795
}
11896
},
11997
"data": {

src/functionaltest/resources/responses/NewInstanceSubscriptionResponse.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
{
1717
"conditions":[
1818
{
19-
"jmespath":"gav.groupId=='com.othercompany.library'"
19+
"jmespath": "identity=='pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0'"
2020
}
2121
]
2222
}

src/functionaltest/resources/responses/RulesTemplateObject.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"MatchIdRules": {
1010
"_id": "%IdentifyRules_objid%"
1111
},
12-
"ExtractionRules": "{ id : meta.id, type : meta.type, time : meta.time, gav : data.gav, fileInformation : data.fileInformation, buildCommand : data.buildCommand }",
12+
"ExtractionRules": "{ id : meta.id, type : meta.type, time : meta.time, identity : data.identity, fileInformation : data.fileInformation, buildCommand : data.buildCommand }",
1313
"DownstreamIdentifyRules": "links | [?type=='COMPOSITION'].target",
1414
"DownstreamMergeRules": "{\"externalComposition\":{\"eventId\":%IdentifyRules%}}",
1515
"DownstreamExtractionRules": "{artifacts: [{id : meta.id}]}",

src/functionaltest/resources/responses/SubscriptionForSaveCase.json

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,82 @@
1-
[
2-
{
1+
[
2+
{
33
"aggregationtype":"eiffel-intelligence",
44
"created":1524037895385,
55
"notificationMeta":"http://eiffel-jenkins1:8080/job/ei-artifact-triggered-job/build",
66
"notificationType":"REST_POST",
77
"restPostBodyMediaType":"application/x-www-form-urlencoded",
8-
"notificationMessageKeyValues":[
9-
{
8+
"notificationMessageKeyValues":[
9+
{
1010
"formkey":"json",
1111
"formvalue":"{parameter: [{ name: 'jsonparams', value : to_string(@) }]}"
1212
}
1313
],
1414
"repeat":false,
15-
"requirements":[
16-
{
17-
"conditions":[
18-
{
19-
"jmespath":"gav.groupId=='com.othercompany.library'"
15+
"requirements":[
16+
{
17+
"conditions":[
18+
{
19+
"jmespath":"identity=='pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0'",
2020
}
2121
]
2222
}
2323
],
2424
"subscriptionName":"Subscription1",
25-
"_id":{
25+
"_id":{
2626
"$oid":"5ad6f907c242af3f1469751d"
2727
}
2828
},
29-
{
29+
{
3030
"aggregationtype":"eiffel-intelligence",
3131
"created":1524037895415,
3232
"notificationMeta":"http://eiffel-jenkins1:8080/job/ei-artifact-triggered-job/build",
3333
"notificationType":"REST_POST",
3434
"restPostBodyMediaType":"application/x-www-form-urlencoded",
35-
"notificationMessageKeyValues":[
36-
{
35+
"notificationMessageKeyValues":[
36+
{
3737
"formkey":"json",
3838
"formvalue":"{parameter: [{ name: 'jsonparams', value : to_string(@) }]}"
3939
}
4040
],
4141
"repeat":false,
42-
"requirements":[
43-
{
44-
"conditions":[
45-
{
46-
"jmespath":"gav.groupId=='com.othercompany.library'"
42+
"requirements":[
43+
{
44+
"conditions":[
45+
{
46+
"jmespath":"identity=='pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0'"
4747
}
4848
]
4949
}
5050
],
5151
"subscriptionName":"Subscription2",
52-
"_id":{
52+
"_id":{
5353
"$oid":"5ad6f907c242af3f1469751e"
5454
}
5555
},
56-
{
56+
{
5757
"aggregationtype":"eiffel-intelligence",
5858
"created":1524223397628,
5959
"notificationMeta":"http://<MyHost:port>/api/doit",
6060
"notificationType":"REST_POST",
6161
"restPostBodyMediaType":"application/json",
62-
"notificationMessageKeyValues":[
63-
{
62+
"notificationMessageKeyValues":[
63+
{
6464
"formkey":"",
6565
"formvalue":"{mydata: [{ fullaggregation : to_string(@) }]}"
6666
}
6767
],
6868
"repeat":false,
69-
"requirements":[
70-
{
71-
"conditions":[
72-
{
73-
"jmespath":"submission.sourceChanges[?submitter.group == 'Team Gophers' && svnIdentifier==null]"
69+
"requirements":[
70+
{
71+
"conditions":[
72+
{
73+
"jmespath":"submission.sourceChanges[?submitter.group == 'Team Gophers' && gitIdentifier==null]"
7474
}
7575
]
7676
}
7777
],
7878
"subscriptionName":"Selenium_test_subscription",
79-
"_id":{
79+
"_id":{
8080
"$oid":"5ad9cda5b715d336247e4980"
8181
}
8282
}

0 commit comments

Comments
 (0)