Skip to content

Commit 01c809f

Browse files
Changes for parsing PURL to GAV component (#206)
* adding JEMSPATH 'match' method in subscription condition * reviewed change
1 parent 70384af commit 01c809f

14 files changed

+26
-26
lines changed

src/functionaltest/resources/responses/DefaultInstanceSubscriptionResponse.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
{
1717
"conditions":[
1818
{
19-
"jmespath":"identity=='pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0'"
19+
"jmespath": "split(identity, '/') | [1] =='com.mycompany.myproduct'"
2020
}
2121
]
2222
}

src/functionaltest/resources/responses/NewInstanceSubscriptionResponse.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
{
1717
"conditions":[
1818
{
19-
"jmespath": "identity=='pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0'"
19+
"jmespath": "split(identity, '/') | [1] =='com.mycompany.myproduct'"
2020
}
2121
]
2222
}

src/functionaltest/resources/responses/SubscriptionForSaveCase.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
{
1717
"conditions":[
1818
{
19-
"jmespath":"identity=='pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0'",
19+
"jmespath": "match(identity, '[a-z]+\\\\.[a-z.]+[a-z]') =='com.mycompany.myproduct'"
2020
}
2121
]
2222
}
@@ -43,7 +43,7 @@
4343
{
4444
"conditions":[
4545
{
46-
"jmespath":"identity=='pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0'"
46+
"jmespath": "split(identity, '/') | [0] =='pkg:maven'"
4747
}
4848
]
4949
}

src/functionaltest/resources/responses/SubscriptionForUploadCase.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
{
1818
"conditions":[
1919
{
20-
"jmespath":"identity=='pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0'"
20+
"jmespath": "split(identity, '/') | [1] =='com.mycompany.myproduct'"
2121
}
2222
]
2323
}
@@ -45,7 +45,7 @@
4545
{
4646
"conditions":[
4747
{
48-
"jmespath":"identity=='pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0'"
48+
"jmespath": "split(identity, '/') | [1] =='com.mycompany.myproduct'"
4949
}
5050
]
5151
}

src/functionaltest/resources/responses/SubscriptionForUploadLDAP.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
{
1818
"conditions":[
1919
{
20-
"jmespath":"identity=='pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0'"
20+
"jmespath": "split(identity, '/') | [1] =='com.mycompany.myproduct'"
2121
}
2222
]
2323
}
@@ -46,7 +46,7 @@
4646
{
4747
"conditions":[
4848
{
49-
"jmespath":"identity=='pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0'"
49+
"jmespath": "split(identity, '/') | [1] =='com.mycompany.myproduct'"
5050
}
5151
]
5252
}

src/functionaltest/resources/responses/SubscriptionObjects.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
{
1717
"conditions":[
1818
{
19-
"jmespath":"identity=='pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0'"
19+
"jmespath": "split(identity, '/') | [1] =='com.mycompany.myproduct'"
2020
}
2121
]
2222
}
@@ -43,7 +43,7 @@
4343
{
4444
"conditions":[
4545
{
46-
"jmespath":"identity=='pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0'"
46+
"jmespath": "split(identity, '/') | [1] =='com.mycompany.myproduct'"
4747
}
4848
]
4949
}

src/functionaltest/resources/responses/SubscriptionTemplate.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
{
1717
"conditions":[
1818
{
19-
"jmespath":"identity=='pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0'"
19+
"jmespath": "split(identity, '/') | [1] =='com.mycompany.myproduct'"
2020
}
2121
]
2222
}
@@ -43,7 +43,7 @@
4343
{
4444
"conditions":[
4545
{
46-
"jmespath":"identity=='pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0'"
46+
"jmespath": "split(identity, '/') | [1] =='com.mycompany.myproduct'"
4747
}
4848
]
4949
}

src/functionaltest/resources/responses/SubscriptionUpload.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"type": "ARTIFACT_1",
1818
"conditions": [
1919
{
20-
"jmespath": "identity=='pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0'"
20+
"jmespath": "split(identity, '/') | [1] =='com.mycompany.myproduct'"
2121
},
2222
{
2323
"jmespath": "testCaseExecutions[?testCase.conclusion == 'SUCCESSFUL' && testCase.id=='TC5']"
@@ -28,7 +28,7 @@
2828
"type": "ARTIFACT_1",
2929
"conditions": [
3030
{
31-
"jmespath": "identity=='pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0'"
31+
"jmespath": "split(identity, '/') | [1] =='com.mycompany.myproduct'"
3232
},
3333
{
3434
"jmespath": "testCaseExecutions[?testCaseStartedEventId == '13af4a14-f951-4346-a1ba-624c79f10e98']"

src/functionaltest/resources/responses/subscription.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"type": "ARTIFACT_1",
1818
"conditions": [
1919
{
20-
"jmespath": "identity=='pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0'"
20+
"jmespath": "split(identity, '/') | [1] =='com.mycompany.myproduct'"
2121
},
2222
{
2323
"jmespath": "testCaseExecutions[?testCase.conclusion == 'SUCCESSFUL' && testCase.id=='TC5']"
@@ -28,7 +28,7 @@
2828
"type": "ARTIFACT_1",
2929
"conditions": [
3030
{
31-
"jmespath": "identity=='pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0'"
31+
"jmespath": "split(identity, '/') | [1] =='com.mycompany.myproduct'"
3232
},
3333
{
3434
"jmespath": "testCaseExecutions[?testCaseStartedEventId == '13af4a14-f951-4346-a1ba-624c79f10e98']"

src/integrationtest/resources/bodies/subscription_single.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
{
1616
"conditions": [
1717
{
18-
"jmespath": "identity=='pkg:maven/com.mycompany.myproduct/artifact-name@2.0.0'"
18+
"jmespath": "split(identity, '/') | [1] =='com.mycompany.myproduct'"
1919
},
2020
{
2121
"jmespath": "testCaseExecutions[?testCase.conclusion == 'SUCCESSFUL' && testCase.id=='TC5']"
@@ -26,7 +26,7 @@
2626
{
2727
"conditions": [
2828
{
29-
"jmespath": "identity=='pkg:maven/com.mycompany.myproduct/artifact-name@2.0.0'"
29+
"jmespath": "split(identity, '/') | [1] =='com.mycompany.myproduct'"
3030
},
3131
{
3232
"jmespath": "testCaseExecutions[?testCaseStartedEventId == '13af4a14-f951-4346-a1ba-624c79f10e98']"

src/integrationtest/resources/bodies/subscription_single_modify.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
{
1616
"conditions": [
1717
{
18-
"jmespath": "identity=='pkg:maven/com.mycompany.myproduct/artifact-name@2.0.0'"
18+
"jmespath": "split(identity, '/') | [1] =='com.mycompany.myproduct'"
1919
},
2020
{
2121
"jmespath": "testCaseExecutions[?testCase.conclusion == 'SUCCESSFUL' && testCase.id=='TC5']"
@@ -26,7 +26,7 @@
2626
{
2727
"conditions": [
2828
{
29-
"jmespath": "identity=='pkg:maven/com.mycompany.myproduct/artifact-name@2.0.0'"
29+
"jmespath": "split(identity, '/') | [1] =='com.mycompany.myproduct'"
3030
},
3131
{
3232
"jmespath": "testCaseExecutions[?testCaseStartedEventId == '13af4a14-f951-4346-a1ba-624c79f10e98']"

src/main/resources/application.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ ei.eiffel.documentation.urls={ "EI Frontend GitHub": "https://github.com/eiffel-
3232
#### LOGGING #########
3333
logging.level.root: INFO
3434
logging.level.org.springframework.web: INFO
35-
logging.level.com.ericsson.ei: INFO
35+
logging.level.com.ericsson.ei: INFO

src/test/resources/backendResponses/subscriptionsOneResponse.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
{
1616
"type": "ARTIFACT_1",
1717
"conditions": [
18-
{"jmespath": "identity=='pkg:maven/com.mycompany.myproduct/artifact-name@3.0.0'"},
18+
{"jmespath": "split(identity, '/') | [1] =='com.mycompany.myproduct'"},
1919
{"jmespath": "testCaseExecutions[?testCase.conclusion == 'SUCCESSFUL' && testCase.id=='TC5']"}
2020
]
2121

2222
},
2323
{
2424
"type": "ARTIFACT_1",
2525
"conditions": [
26-
{"jmespath": "identity=='pkg:maven/com.mycompany.myproduct/artifact-name@3.0.0'"},
26+
{"jmespath": "split(identity, '/') | [1] =='com.mycompany.myproduct'"},
2727
{"jmespath": "testCaseExecutions[?testCaseStartedEventId == '13af4a14-f951-4346-a1ba-624c79f10e98']"}
2828
]
2929

wiki/markdown/curl-examples.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ The back-end used is running on localhost and port 8080. EI front-end forwards t
374374
{
375375
"conditions":[
376376
{
377-
"jmespath":"identity=='pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0'"
377+
"jmespath": "split(identity, '/') | [1] =='com.mycompany.myproduct'"
378378
}
379379
]
380380
}
@@ -406,7 +406,7 @@ The back-end used is running on localhost and port 8080. EI front-end forwards t
406406
{
407407
"conditions":[
408408
{
409-
"jmespath":"identity=='pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0'"
409+
"jmespath": "split(identity, '/') | [1] =='com.mycompany.myproduct'"
410410
}
411411
]
412412
}
@@ -437,7 +437,7 @@ The back-end used is running on localhost and port 8080. EI front-end forwards t
437437
{
438438
"conditions":[
439439
{
440-
"jmespath":"identity=='pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0'"
440+
"jmespath": "split(identity, '/') | [1] =='com.mycompany.myproduct'"
441441
}
442442
]
443443
}

0 commit comments

Comments
 (0)