package nl.soutenet.vertx.mod.integration.cluster;

import nl.jpoint.vertx.mod.cluster.ClusterManagerModule;
import org.junit.Test;
import org.vertx.java.core.AsyncResult;
import org.vertx.java.core.Future;
import org.vertx.java.core.Handler;
import org.vertx.java.core.json.JsonObject;
import org.vertx.testtools.TestVerticle;
import org.vertx.testtools.VertxAssert;

import static org.vertx.testtools.VertxAssert.fail;

public class VertxModuleTest extends TestVerticle {

    @Override
    public void start(final Future<Void> startResult) {
        VertxAssert.initialize(getVertx());
        Handler<AsyncResult<String>> handler = new Handler<AsyncResult<String>>() {
            @Override
            public void handle(AsyncResult<String> event) {
                if (event.failed()) {
                    getContainer().logger().error(event.cause().getMessage(), event.cause());
                    fail();
                }
                VertxModuleTest.super.start();
                startResult.setResult(null);
            }
        };
///home/marcel/Java/Projects/vertx-deploy-tools/vertx-deploy-mod/src/test/resources

        JsonObject config = new JsonObject();
        config.putString("aws.auth.access.key", "1");
        config.putString("aws.auth.secret.access.key", "1");
        config.putString("vertx.home", "src/test/resources/vertx");
        config.putString("mod.root", "/tmp/vertx/mods/");
        config.putString("artifact.repo", "/tmp/");
        config.putString("http.authUser", "edubase-build");
        config.putString("http.authPass", "aZV1zvdGZ1wXzeDajlRM");
        config.putString("http.authUri", "nexus.build.edubase.malmberg.nl");

        container.deployVerticle(ClusterManagerModule.class.getName(), config, handler);
    }

    @Test
    public void testInitialize() throws Exception {

        //testComplete();
    }


}


@@ -413,16 +413,76 @@
 rt.fail;
+%0Aimport static org.vertx.testtools.VertxAssert.testComplete;
 %0A%0Apublic
@@ -1106,92 +1106,8 @@
   %7D;
-%0A///home/marcel/Java/Projects/vertx-deploy-tools/vertx-deploy-mod/src/test/resources
 %0A%0A  
@@ -1446,212 +1446,8 @@
 /%22);
-%0A        config.putString(%22http.authUser%22, %22edubase-build%22);%0A        config.putString(%22http.authPass%22, %22aZV1zvdGZ1wXzeDajlRM%22);%0A        config.putString(%22http.authUri%22, %22nexus.build.edubase.malmberg.nl%22);
 %0A%0A  
@@ -1602,25 +1602,24 @@
 ption %7B%0A
-%0A
         
 //testCo
@@ -1614,10 +1614,8 @@
     
-//
 test

Check if as group is in a deployable state