use of org.eclipse.hono.tests.IntegrationTestSupport in project hono by eclipse.
the class HttpTestBase method init.
/**
* Sets up clients.
*
* @param ctx The vert.x test context.
*/
@BeforeClass
public static void init(final TestContext ctx) {
helper = new IntegrationTestSupport(VERTX);
helper.init(ctx);
httpClient = new CrudHttpClient(VERTX, IntegrationTestSupport.HTTP_HOST, IntegrationTestSupport.HTTP_PORT);
}
use of org.eclipse.hono.tests.IntegrationTestSupport in project hono by eclipse.
the class DeviceRegistryTestBase method setUp.
/**
* Creates a new integration test helper and connects to the messaging network.
*
* @param vertx The vert.x instance to use for the helper.
*/
@BeforeEach
public void setUp(final Vertx vertx, final VertxTestContext ctx) {
helper = new IntegrationTestSupport(vertx);
helper.initRegistryClient();
helper.init().onComplete(ctx.succeedingThenComplete());
}
use of org.eclipse.hono.tests.IntegrationTestSupport in project hono by eclipse.
the class HttpTestBase method setUp.
/**
* Sets up the fixture.
*
* @param testInfo Meta info about the test being run.
* @param ctx The vert.x test context.
*/
@BeforeEach
public void setUp(final TestInfo testInfo, final VertxTestContext ctx) {
testStartTimeMillis = System.currentTimeMillis();
logger.info("running {}", testInfo.getDisplayName());
helper = new IntegrationTestSupport(vertx);
logger.info("using HTTP adapter [host: {}, http port: {}, https port: {}]", IntegrationTestSupport.HTTP_HOST, IntegrationTestSupport.HTTP_PORT, IntegrationTestSupport.HTTPS_PORT);
deviceCert = SelfSignedCertificate.create(UUID.randomUUID().toString());
httpClient = new CrudHttpClient(vertx, new HttpClientOptions(defaultOptions));
httpClientWithClientCert = new CrudHttpClient(vertx, new HttpClientOptions(defaultOptions).setKeyCertOptions(deviceCert.keyCertOptions()));
tenantId = helper.getRandomTenantId();
deviceId = helper.getRandomDeviceId(tenantId);
authorization = getBasicAuth(tenantId, deviceId, PWD);
helper.init().onComplete(ctx.succeedingThenComplete());
}
use of org.eclipse.hono.tests.IntegrationTestSupport in project hono by eclipse.
the class MqttTestBase method createHelper.
/**
* Create integration test helper.
*
* @param testInfo The JUnit test info.
* @param ctx The vert.x context.
*/
@BeforeEach
public void createHelper(final TestInfo testInfo, final VertxTestContext ctx) {
LOGGER.info("running {}", testInfo.getDisplayName());
helper = new IntegrationTestSupport(vertx);
helper.init().onComplete(ctx.succeedingThenComplete());
}
Aggregations