Skip to content

Commit 797c297

Browse files
Change expected structure of aggregated object in tests (#251)
Change the expected structure of aggregated object in integration tests.
1 parent 495c622 commit 797c297

File tree

4 files changed

+34
-43
lines changed

4 files changed

+34
-43
lines changed

src/integrationtest/java/com/ericsson/ei/frontend/CommonSteps.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public void aggregation_is_prepared(String rulesFileName, String eventsFileName)
142142
httpRequest.setBody(body);
143143
}
144144

145-
@When("^username \"(\\w+)\" and password \"(\\w+)\" is used as credentials$")
145+
@When("^username \"([^\"]*)\" and password \"([^\"]*)\" is used as credentials$")
146146
public void with_credentials(String username, String password) throws Throwable {
147147
String auth = username + ":" + password;
148148
String encodedAuth = new String(Base64.encodeBase64(auth.getBytes()), "UTF-8");
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"criteria": {
3-
"aggregatedObject.identity": "pkg:maven/com.mycompany.myproduct/artifact-name@2.0.0"
3+
"identity": "pkg:maven/com.mycompany.myproduct/artifact-name@2.0.0"
44
}
55
}

src/integrationtest/resources/integration-test.properties

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,6 @@ spring.data.mongodb.database: eiffel_intelligence
5555
server.session-timeout: 1200
5656
sessions.collection.name: sessions
5757

58-
# name of the aggregated object for user to prefix each query criteria
59-
# This property will be used as a prefix to each criteria of the
60-
# query. It is replaced dynamically with the name of the object stored, in
61-
# the data base.
62-
search.query.prefix: object
63-
# name of the aggregated object in the collection
64-
aggregated.object.name: aggregatedObject
6558
# name of the collection where aggregated objects are stored
6659
aggregated.collection.name: aggregated_objects
6760
# time to live value in seconds for aggregated objects.
Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,37 @@
11
[
22
{
33
"_id": "df4cdb42-1580-4cff-b97a-4d0faa9b2b22_ARTIFACT_TEST",
4-
"aggregatedObject": {
5-
"fileInformation": [
6-
{
7-
"extension": "war",
8-
"classifier": ""
9-
}
10-
],
11-
"buildCommand": "trigger",
12-
"identity": "pkg:maven/com.mycompany.myproduct/artifact-name@2.0.0",
13-
"confidenceLevels": [
14-
{
15-
"eventId": "e3be0cf8-2ebd-4d6d-bf5c-a3b535cd084e_ARTIFACT_TEST",
16-
"name": "dummy_1_stable",
17-
"time": 1521452400324,
18-
"value": "SUCCESS"
19-
}
20-
],
21-
"TemplateName": "ARTIFACT_TEST",
22-
"id": "df4cdb42-1580-4cff-b97a-4d0faa9b2b22_ARTIFACT_TEST",
23-
"time": 1521452368194,
24-
"type": "EiffelArtifactCreatedEvent",
25-
"publications": [
26-
{
27-
"eventId": "2acd348d-05e6-4945-b441-dc7c1e55534e_ARTIFACT_TEST",
28-
"locations": [
29-
{
30-
"type": "NEXUS",
31-
"uri": "http://localhost:8081/repository/test"
32-
}
33-
],
34-
"time": 1521452368758
35-
}
36-
]
37-
}
4+
"fileInformation": [
5+
{
6+
"extension": "war",
7+
"classifier": ""
8+
}
9+
],
10+
"buildCommand": "trigger",
11+
"identity": "pkg:maven/com.mycompany.myproduct/artifact-name@2.0.0",
12+
"confidenceLevels": [
13+
{
14+
"eventId": "e3be0cf8-2ebd-4d6d-bf5c-a3b535cd084e_ARTIFACT_TEST",
15+
"name": "dummy_1_stable",
16+
"time": 1521452400324,
17+
"value": "SUCCESS"
18+
}
19+
],
20+
"TemplateName": "ARTIFACT_TEST",
21+
"id": "df4cdb42-1580-4cff-b97a-4d0faa9b2b22_ARTIFACT_TEST",
22+
"time": 1521452368194,
23+
"type": "EiffelArtifactCreatedEvent",
24+
"publications": [
25+
{
26+
"eventId": "2acd348d-05e6-4945-b441-dc7c1e55534e_ARTIFACT_TEST",
27+
"locations": [
28+
{
29+
"type": "NEXUS",
30+
"uri": "http://localhost:8081/repository/test"
31+
}
32+
],
33+
"time": 1521452368758
34+
}
35+
]
3836
}
3937
]

0 commit comments

Comments
 (0)