Skip to content

Commit

Permalink
fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
lharzenetter committed Dec 8, 2020
1 parent 7522136 commit 264e2ed
Show file tree
Hide file tree
Showing 10 changed files with 273 additions and 243 deletions.
Expand Up @@ -136,7 +136,7 @@ public void assertGet(String restURL, String fileName) {
.get(callURL(restURL))
.then()
.log()
.ifValidationFails()
.all()
.statusCode(200)
.extract()
.response()
Expand Down
Expand Up @@ -60,7 +60,8 @@ public void getServicetemplate() throws Exception {
@Test
public void getServiceTemplateWithProperties() throws Exception {
this.setRevisionTo("3465576f5b46079bb26f5c8e93663424440421a0");
this.assertGet("servicetemplates/http%253A%252F%252Fwinery.opentosca.org%252Ftest%252Fservicetemplates%252Fponyuniverse%252Fdriverinjection/DriverInjectionTest/topologytemplate", "entitytypes/servicetemplates/DriverInjection.json");
this.assertGet("servicetemplates/http%253A%252F%252Fwinery.opentosca.org%252Ftest%252Fservicetemplates%252Fponyuniverse%252Fdriverinjection/DriverInjectionTest/topologytemplate",
"entitytypes/servicetemplates/DriverInjection.json");
}

@Test
Expand Down Expand Up @@ -119,7 +120,8 @@ public void getXaasPackagerData() throws Exception {
@Test
public void checkJsonOfServiceTemplateMinimalExampleWithAllPropertyVariants() throws Exception {
this.setRevisionTo("origin/plain");
this.assertGet("servicetemplates/http%253A%252F%252Fplain.winery.opentosca.org%252Fservicetemplates/ServiceTemplateMinimalExampleWithAllPropertyVariants", "servicetemplates/plain-ServiceTemplateMinimalExampleWithAllPropertyVariants.json");
this.assertGet("servicetemplates/http%253A%252F%252Fplain.winery.opentosca.org%252Fservicetemplates/ServiceTemplateMinimalExampleWithAllPropertyVariants",
"servicetemplates/plain-ServiceTemplateMinimalExampleWithAllPropertyVariants.json");
}

@Test
Expand Down
Expand Up @@ -46,7 +46,8 @@ public void getServicetemplate() throws Exception {
@Test
public void getComponentInstanceJSON() throws Exception {
this.setRevisionTo("3fe0df76e98d46ead68295920e5d1cf1354bdea1");
this.assertGet("servicetemplates/http%253A%252F%252Fwinery.opentosca.org%252Ftest%252Fservicetemplates%252Ffruits/baobab_serviceTemplate/topologytemplate/", "servicetemplates/baobab_topologytemplate.json");
this.assertGet("servicetemplates/http%253A%252F%252Fwinery.opentosca.org%252Ftest%252Fservicetemplates%252Ffruits/baobab_serviceTemplate/topologytemplate/",
"servicetemplates/baobab_topologytemplate.json");
}

@Test
Expand Down Expand Up @@ -87,7 +88,8 @@ public void apacheSparkAppOnVspheretopologyTemplateUpdateWithEmptyListsGetTheLis
@Test
public void farmTopologyTemplateIsCorrectlyReturnAsJson() throws Exception {
this.setRevisionTo("2d35f0d3c15b384c53df10967164d97e4a7dd6f2");
this.assertGet("servicetemplates/http%253A%252F%252Fwinery.opentosca.org%252Ftest%252Fservicetemplates%252Ffruits/farm/topologytemplate/", "servicetemplates/farm_topologytemplate.json");
this.assertGet("servicetemplates/http%253A%252F%252Fwinery.opentosca.org%252Ftest%252Fservicetemplates%252Ffruits/farm/topologytemplate/",
"servicetemplates/farm_topologytemplate.json");
}

@Test
Expand Down
Expand Up @@ -5,48 +5,6 @@
],
"otherAttributes": {
},
"relationshipTemplates": [
{
"id": "con_25",
"documentation": [
],
"any": [
],
"otherAttributes": {
},
"type": "{http://winery.opentosca.org/test/ponyuniverse}standsOn",
"sourceElement": {
"ref": "shetland_pony"
},
"targetElement": {
"ref": "straw"
},
"name": "con_25"
},
{
"id": "con_47",
"documentation": [
],
"any": [
],
"otherAttributes": {
},
"properties": {
"propertyType": "KV",
"kvproperties": {
"Driver": ""
}
},
"type": "{http://winery.opentosca.org/test/ponyuniverse}attendTo",
"sourceElement": {
"ref": "shetland_pony"
},
"targetElement": {
"ref": "ponycompetition"
},
"name": "con_47"
}
],
"nodeTemplates": [
{
"id": "shetland_pony",
Expand Down Expand Up @@ -82,8 +40,8 @@
"name": "shetland_pony",
"minInstances": 1,
"maxInstances": "1",
"x": "677",
"y": "161"
"y": "161",
"x": "677"
},
{
"id": "straw",
Expand All @@ -100,8 +58,8 @@
"name": "straw",
"minInstances": 1,
"maxInstances": "1",
"x": "677",
"y": "545"
"y": "545",
"x": "677"
},
{
"id": "ponycompetition",
Expand Down Expand Up @@ -148,8 +106,51 @@
"name": "ponycompetition",
"minInstances": 1,
"maxInstances": "1",
"x": "1237",
"y": "137"
"y": "137",
"x": "1237"
}
],
"relationshipTemplates": [
{
"id": "con_25",
"documentation": [
],
"any": [
],
"otherAttributes": {
},
"type": "{http://winery.opentosca.org/test/ponyuniverse}standsOn",
"sourceElement": {
"ref": "shetland_pony"
},
"targetElement": {
"ref": "straw"
},
"name": "con_25"
},
{
"id": "con_47",
"documentation": [
],
"any": [
],
"otherAttributes": {
},
"properties": {
"propertyType": "KV",
"namespace": "http://winery.opentosca.org/test/ponyuniverse/propertiesdefinition/winery",
"kvproperties": {
"Driver": ""
}
},
"type": "{http://winery.opentosca.org/test/ponyuniverse}attendTo",
"sourceElement": {
"ref": "shetland_pony"
},
"targetElement": {
"ref": "ponycompetition"
},
"name": "con_47"
}
]
}
Expand Up @@ -6,31 +6,6 @@
],
"otherAttributes": {
},
"relationshipTemplates": [
{
"id": "con_47",
"documentation": [
],
"any": [
],
"otherAttributes": {
},
"properties": {
"propertyType": "KV",
"kvproperties": {
"Driver": ""
}
},
"type": "{http://winery.opentosca.org/test/ponyuniverse}attendTo",
"sourceElement": {
"ref": "shetland_pony"
},
"targetElement": {
"ref": "ponycompetition"
},
"name": "con_47"
}
],
"nodeTemplates": [
{
"id": "shetland_pony",
Expand Down Expand Up @@ -66,8 +41,8 @@
"name": "shetland_pony",
"minInstances": 1,
"maxInstances": "1",
"x": "677",
"y": "161"
"y": "161",
"x": "677"
},
{
"id": "ponycompetition",
Expand Down Expand Up @@ -114,8 +89,34 @@
"name": "ponycompetition",
"minInstances": 1,
"maxInstances": "1",
"x": "1237",
"y": "137"
"y": "137",
"x": "1237"
}
],
"relationshipTemplates": [
{
"id": "con_47",
"documentation": [
],
"any": [
],
"otherAttributes": {
},
"properties": {
"propertyType": "KV",
"namespace": "http://winery.opentosca.org/test/ponyuniverse/propertiesdefinition/winery",
"kvproperties": {
"Driver": ""
}
},
"type": "{http://winery.opentosca.org/test/ponyuniverse}attendTo",
"sourceElement": {
"ref": "shetland_pony"
},
"targetElement": {
"ref": "ponycompetition"
},
"name": "con_47"
}
]
},
Expand Down Expand Up @@ -190,8 +191,8 @@
"name": "dressageequipment",
"minInstances": 1,
"maxInstances": "1",
"x": "804",
"y": "270"
"y": "270",
"x": "804"
}
],
"relationshipTemplates": [
Expand Down
Expand Up @@ -19,6 +19,8 @@
},
"properties": {
"propertyType": "KV",
"namespace": "http://winery.opentosca.org/test/nodetypes/fruits",
"elementName": "BaobabProperties",
"kvproperties": {
"Antioxidants": "",
"VitaminC": "",
Expand All @@ -31,10 +33,10 @@
"name": "baobab",
"minInstances": 1,
"maxInstances": "1",
"x": "678",
"y": "287"
"y": "287",
"x": "678"
}
],
"relationshipTemplates": [
]
}
}

0 comments on commit 264e2ed

Please sign in to comment.