Search in sources :

Example 1 with EntityGroupCheck

use of com.axibase.tsd.api.method.checks.EntityGroupCheck in project atsd-api-test by axibase.

the class TokenEntityGroupTest method testUpdateMethod.

@Test(description = "Tests entity group update endpoint.")
@Issue("6052")
public void testUpdateMethod() throws Exception {
    String entityGroupName = Mocks.entityGroup();
    String url = "/entity-groups/" + entityGroupName;
    String token = TokenRepository.getToken(username, "PATCH", url);
    EntityGroup entityGroup = new EntityGroup(entityGroupName);
    createOrReplaceEntityGroupCheck(entityGroup);
    entityGroup.setTags(Mocks.TAGS);
    updateEntityGroup(entityGroup, token);
    Checker.check(new EntityGroupCheck(entityGroup));
}
Also used : EntityGroupCheck(com.axibase.tsd.api.method.checks.EntityGroupCheck) EntityGroup(com.axibase.tsd.api.model.entitygroup.EntityGroup) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 2 with EntityGroupCheck

use of com.axibase.tsd.api.method.checks.EntityGroupCheck in project atsd-api-test by axibase.

the class TokenEntityGroupTest method testDeleteMethod.

@Test(description = "Tests entity group delete endpoint.")
@Issue("6052")
public void testDeleteMethod() throws Exception {
    String entityGroupName = Mocks.entityGroup();
    String url = "/entity-groups/" + entityGroupName;
    String token = TokenRepository.getToken(username, HttpMethod.DELETE, url);
    EntityGroup entityGroup = new EntityGroup(entityGroupName);
    createOrReplaceEntityGroupCheck(entityGroup);
    deleteEntityGroup(entityGroupName, token);
    Checker.check(new DeletionCheck(new EntityGroupCheck(entityGroup)));
}
Also used : EntityGroupCheck(com.axibase.tsd.api.method.checks.EntityGroupCheck) EntityGroup(com.axibase.tsd.api.model.entitygroup.EntityGroup) DeletionCheck(com.axibase.tsd.api.method.checks.DeletionCheck) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Example 3 with EntityGroupCheck

use of com.axibase.tsd.api.method.checks.EntityGroupCheck in project atsd-api-test by axibase.

the class TokenEntityGroupTest method testCreateMethod.

@Test(description = "Tests entity group create or replace endpoint.")
@Issue("6052")
public void testCreateMethod() throws Exception {
    String entityGroupName = Mocks.entityGroup();
    String url = "/entity-groups/" + entityGroupName;
    String token = TokenRepository.getToken(username, HttpMethod.PUT, url);
    EntityGroup entityGroup = new EntityGroup(entityGroupName);
    createOrReplaceEntityGroup(entityGroup, token);
    Checker.check(new EntityGroupCheck(entityGroup));
}
Also used : EntityGroupCheck(com.axibase.tsd.api.method.checks.EntityGroupCheck) EntityGroup(com.axibase.tsd.api.model.entitygroup.EntityGroup) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Aggregations

EntityGroupCheck (com.axibase.tsd.api.method.checks.EntityGroupCheck)3 EntityGroup (com.axibase.tsd.api.model.entitygroup.EntityGroup)3 Issue (io.qameta.allure.Issue)3 Test (org.testng.annotations.Test)3 DeletionCheck (com.axibase.tsd.api.method.checks.DeletionCheck)1