use of org.jboss.pnc.client.EnvironmentClient in project pnc by project-ncl.
the class EnvironmentEndpointTest method prepareData.
@BeforeClass
public static void prepareData() throws Exception {
EnvironmentClient client = new EnvironmentClient(RestClientConfiguration.asAnonymous());
environmentId = client.getAll().iterator().next().getId();
}
use of org.jboss.pnc.client.EnvironmentClient in project pnc by project-ncl.
the class EnvironmentEndpointTest method testGetAllEnvironments.
@Test
@InSequence(10)
public void testGetAllEnvironments() throws RemoteResourceException {
EnvironmentClient client = new EnvironmentClient(RestClientConfiguration.asAnonymous());
RemoteCollection<Environment> all = client.getAll();
// from DatabaseDataInitializer
assertThat(all).hasSize(2);
}
use of org.jboss.pnc.client.EnvironmentClient in project pnc by project-ncl.
the class SecondLevelCacheStoreTest method prepareData.
/**
* At first we need to create testing data and commit it.
*/
@Test
@InSequence(-2)
public void prepareData() throws Exception {
EnvironmentClient client = new EnvironmentClient(RestClientConfiguration.asAnonymous());
environmentId = client.getAll().iterator().next().getId();
SCMRepositoryClient scmrc = new SCMRepositoryClient(RestClientConfiguration.asAnonymous());
final Iterator<SCMRepository> scmrIt = scmrc.getAll(null, null).iterator();
repositoryConfigurationBCId = scmrIt.next().getId();
repositoryConfigurationDepBCId = scmrIt.next().getId();
Project projectBC = createProjectAndValidateResults("https://github.com/project-ncl/dependency-analysis", null, "Dependency Analysis New", "Dependency Analysis - Analise project dependencies.");
Project projectDepBC = createProjectAndValidateResults("https://github.com/project-ncl/pnc", null, "Project Newcastle Demo Project 1 New", "Example Project for Newcastle Demo");
projectBCId = projectBC.getId();
projectDepBCId = projectDepBC.getId();
BuildConfiguration dependencyBC = createBuildConfigurationAndValidateResults(projectDepBCId, environmentId, repositoryConfigurationDepBCId, "pnc-1.0.0.DR1-new", UUID.randomUUID().toString());
BuildConfiguration buildConfiguration = createBuildConfigurationAndValidateResults(projectBCId, environmentId, repositoryConfigurationBCId, "dependency-analysis-master-new", UUID.randomUUID().toString());
dependencyBCId = dependencyBC.getId();
buildConfigurationId = buildConfiguration.getId();
}
Aggregations