use of com.sequenceiq.it.verification.Verification in project cloudbreak by hortonworks.
the class StackCreationMock method verifyCalls.
public void verifyCalls(String clusterName) {
verify(SALT_BOOT_ROOT + "/health", "GET").exactTimes(1).verify();
Verification distributeVerification = verify(SALT_BOOT_ROOT + "/salt/action/distribute", "POST").exactTimes(1);
for (CloudVmMetaDataStatus status : getInstanceMap().values()) {
distributeVerification.bodyContains("address\":\"" + status.getMetaData().getPrivateIp());
}
distributeVerification.verify();
verify(AMBARI_API_ROOT + "/services/AMBARI/components/AMBARI_SERVER", "GET").exactTimes(1).verify();
verify(AMBARI_API_ROOT + "/clusters", "GET").exactTimes(2).verify();
verify(AMBARI_API_ROOT + "/check", "GET").atLeast(1).verify();
verify(AMBARI_API_ROOT + "/users/admin", "PUT").exactTimes(1).bodyContains("Users/password").bodyContains("Users/old_password").verify();
verify(AMBARI_API_ROOT + "/blueprints/bp", "POST").exactTimes(1).bodyContains("blueprint_name").bodyContains("stack_name").bodyContains("stack_version").bodyContains("host_groups").exactTimes(1).verify();
verify(AMBARI_API_ROOT + "/clusters/" + clusterName, "POST").exactTimes(1).bodyContains("blueprint").bodyContains("default_password").bodyContains("host_groups").verify();
verify(AMBARI_API_ROOT + "/clusters/" + clusterName + "/requests/1", "GET").atLeast(1).verify();
verify(SALT_API_ROOT + "/run", "POST").bodyContains("fun=saltutil.sync_grains").atLeast(1).verify();
verify(SALT_API_ROOT + "/run", "POST").bodyContains("fun=mine.update").atLeast(1).verify();
verify(SALT_API_ROOT + "/run", "POST").bodyContains("fun=state.highstate").atLeast(2).verify();
verify(SALT_API_ROOT + "/run", "POST").bodyContains("fun=jobs.lookup_jid").bodyContains("jid=1").atLeast(2).verify();
verify(SALT_API_ROOT + "/run", "POST").bodyContains("fun=grains.append").bodyContains("ambari_agent_install").exactTimes(1).verify();
verify(SALT_API_ROOT + "/run", "POST").bodyContains("fun=grains.append").bodyContains("ambari_agent").exactTimes(2).verify();
verify(SALT_API_ROOT + "/run", "POST").bodyContains("fun=grains.append").bodyContains("ambari_server_install").exactTimes(1).verify();
verify(SALT_API_ROOT + "/run", "POST").bodyContains("fun=grains.append").bodyContains("ambari_server").exactTimes(2).verify();
verify(SALT_API_ROOT + "/run", "POST").bodyContains("fun=grains.append").bodyContains("recipes").exactTimes(2).verify();
verify(SALT_API_ROOT + "/run", "POST").bodyContains("fun=grains.remove").bodyContains("recipes").exactTimes(2).verify();
verify(SALT_API_ROOT + "/run", "POST").bodyContains("fun=jobs.active").atLeast(2).verify();
verify(SALT_BOOT_ROOT + "/file", "POST").exactTimes(0).verify();
verify(SALT_BOOT_ROOT + "/file/distribute", "POST").exactTimes(4).verify();
}
Aggregations