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

Commit

Permalink
Merge pull request #420 from ppalaga/HAWKULAR-530
Browse files Browse the repository at this point in the history
Hawkular 530
  • Loading branch information
mtho11 committed Aug 26, 2015
2 parents dcb4d22 + 5da81ff commit 3edf609
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 15 deletions.
15 changes: 15 additions & 0 deletions .travis.maven.settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,21 @@
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
<!-- fallback for case when repository.jboss.org is out of sync with origin -->
<repository>
<id>jboss-origin</id>
<name>JBoss Origin Public Maven Repository Group</name>
<url>http://origin-repository.jboss.org/nexus/content/repositories/public-jboss</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ module HawkularMetrics {
var promises = [];
var tmpResourceList = [];
angular.forEach(aResourceList, function(res, idx) {
if (res.id.startsWith(new RegExp(this.$routeParams.resourceId + '~~'))) {
if (res.id.startsWith(new RegExp(this.$routeParams.resourceId + '~/'))) {
tmpResourceList.push(res);
promises.push(this.HawkularMetric.GaugeMetricData(this.$rootScope.currentPersona.id).queryMetrics({
gaugeId: 'MI~R~[' + res.id + ']~MT~Datasource Pool Metrics~Available Count',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ module HawkularMetrics {
var promises = [];
var tmpResourceList = [];
angular.forEach(aResourceList, function(res: any) {
if (res.id.startsWith(new RegExp(this.$routeParams.resourceId + '~~'))) {
if (res.id.startsWith(new RegExp(this.$routeParams.resourceId + '~/'))) {
tmpResourceList.push(res);
res.selected = _.result(_.find(this.resourceList, {'id': res.id}), 'selected');
promises.push(this.HawkularMetric.AvailabilityMetricData(this.$rootScope.currentPersona.id).query({
Expand Down
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
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@
<version.commons.io>2.4</version.commons.io>
<version.gnu.getopt>1.0.13</version.gnu.getopt>
<version.org.hawkular.accounts>1.0.10.Final</version.org.hawkular.accounts>
<version.org.hawkular.agent>0.3.6-SNAPSHOT</version.org.hawkular.agent>
<version.org.hawkular.agent>0.4.1</version.org.hawkular.agent>
<version.org.hawkular.alerts>0.3.3.Final</version.org.hawkular.alerts>
<version.org.hawkular.bus>0.3.4</version.org.hawkular.bus>
<version.org.hawkular.bus>0.4.0</version.org.hawkular.bus>
<version.org.hawkular.commons>0.2.1.Final</version.org.hawkular.commons>
<version.org.hawkular.metrics>0.5.0.Final</version.org.hawkular.metrics>
<version.org.hawkular.inventory>0.3.1</version.org.hawkular.inventory>
<version.org.hawkular.inventory>0.3.2.Final</version.org.hawkular.inventory>
<version.org.hawkular.nest>0.3.4</version.org.hawkular.nest>
<version.org.keycloak>1.3.1.Final</version.org.keycloak>
<version.org.testng>6.5.2</version.org.testng>
Expand Down

0 comments on commit 3edf609

Please sign in to comment.