Package org.rhq.modules.integrationTests.restApi.d

Examples of org.rhq.modules.integrationTests.restApi.d.Availability


    public void testNoDisabledForPlatforms() throws Exception {

        // Platforms should not be set to DISABLED according to JSHAUGHN

        long now = System.currentTimeMillis()-100;
        Availability avail = new Availability(_platformId,now,"DISABLED");

        given()
            .body(avail)
            .header("Content-Type", "application/json")
            .header("Accept", "application/json")
View Full Code Here


            // Wait a while - see https://bugzilla.redhat.com/show_bug.cgi?id=830299
            Thread.sleep(60*1000);

            // Send a avail down/up sequence -> alert definition should fire
            long now = System.currentTimeMillis();
            Availability a = new Availability(_platformId,now-2000,"DOWN");
            given()
                .contentType(ContentType.JSON)
                .pathParam("id", _platformId)
                .body(a)
            .expect()
                .statusCode(204)
                .log().ifError()
            .when()
                .put("/resource/{id}/availability");

            a = new Availability(_platformId,now-1000,"UP");
            given()
                .contentType(ContentType.JSON)
                .pathParam("id", _platformId)
                .body(a)
            .expect()
View Full Code Here

            // Wait a while - see https://bugzilla.redhat.com/show_bug.cgi?id=830299
            Thread.sleep(60*1000);

            // Send a avail down/up sequence -> alert definition should fire
            long now = System.currentTimeMillis();
            Availability a = new Availability(_platformId,now-2000,"DOWN");
            given()
                .contentType(ContentType.JSON)
                .pathParam("id", _platformId)
                .body(a)
            .expect()
                .statusCode(204)
                .log().ifError()
            .when()
                .put("/resource/{id}/availability");

            a = new Availability(_platformId,now-1000,"UP");
            given()
                .contentType(ContentType.JSON)
                .pathParam("id", _platformId)
                .body(a)
            .expect()
View Full Code Here

            // Wait a while - see https://bugzilla.redhat.com/show_bug.cgi?id=830299
            Thread.sleep(60*1000);

            // Send a avail down/up sequence -> alert definition should fire
            long now = System.currentTimeMillis();
            Availability a = new Availability(_platformId,now-2000,"DOWN");
            given()
                .contentType(ContentType.JSON)
                .pathParam("id", _platformId)
                .body(a)
            .expect()
                .statusCode(204)
                .log().ifError()
            .when()
                .put("/resource/{id}/availability");

            a = new Availability(_platformId,now-1000,"UP");
            given()
                .contentType(ContentType.JSON)
                .pathParam("id", _platformId)
                .body(a)
            .expect()
View Full Code Here

TOP

Related Classes of org.rhq.modules.integrationTests.restApi.d.Availability

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.