Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Fix Inventory configuration itests
Browse files Browse the repository at this point in the history
  • Loading branch information
ppalaga committed Aug 26, 2015
1 parent 17f2150 commit c1c257a
Showing 1 changed file with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,7 @@ class InventoryITest extends AbstractTestBase {
properties: [
fear : [
type: "string",
oneOf: [
[format: "dentists"],
[format: "lawyers"],
[format: "rats"]
]
enum: ["dentists", "lawyers", "rats"]
]
]
]
Expand Down Expand Up @@ -374,9 +370,10 @@ class InventoryITest extends AbstractTestBase {
try {
response = client.post(path: "$basePath/$environmentId/resources/$host2ResourceId/data",
body: invalidData)
assertEquals(400, response.status) // validation should fail resulting in http 400 (BAD REQUEST)
} catch (Exception e) {
println(e)
Assert.fail("groovyx.net.http.HttpResponseException expected")
} catch (groovyx.net.http.HttpResponseException e) {
/* validation should fail resulting in http 400 (BAD REQUEST) */
assertEquals("Bad Request", e.getMessage())
}

/* add a config data to a resource, no need to clean up, it'll be deleted together with the resources */
Expand Down Expand Up @@ -568,8 +565,9 @@ class InventoryITest extends AbstractTestBase {

@Test
void testConfigCreated() {
assertEntitiesExist("$environmentId/resources/$host2ResourceId/data",
["/e;" + environmentId + "/r;" + host2ResourceId + "/d;configuration"])
print "--- testConfigCreated ---"
assertEntityExists("$environmentId/resources/$host2ResourceId/data",
"/e;" + environmentId + "/r;" + host2ResourceId + "/d;configuration")
// assertEntitiesExist("$environmentId/resources/$host2ResourceId%2Ftable/data?dataType=connectionConfiguration",
// ["/e;" + environmentId + "/r;" + host2ResourceId + "/d;connectionConfiguration"])
}
Expand Down

0 comments on commit c1c257a

Please sign in to comment.