Package com.sonyericsson.hudson.plugins.gerrit.trigger.config

Examples of com.sonyericsson.hudson.plugins.gerrit.trigger.config.Config


        assertTrue("Listener has not been registered", list.size() > 0);

        buildListenerLatch = new CountDownLatch(2);
        GerritServer gerritServer = PluginImpl.getInstance().getServer(PluginImpl.DEFAULT_SERVER_NAME);

        Config config = (Config)gerritServer.getConfig();
        config.setBuildScheduleDelay(0);

        gerritServer.setConfig(config);

        DuplicatesUtil.createGerritTriggeredJob(j, "projectX");
        server.waitForCommand(GERRIT_STREAM_EVENTS, 2000);
View Full Code Here


        Collection<GerritEventListener> savedEventListeners =
                Whitebox.getInternalState(handler, "gerritEventListeners");
        // DependencyQueueTaskDispatcher adds 1 listener
        // ReplicationQueueTaskDispatcher adds 1 listener
        assertEquals(3, savedEventListeners.size());
        Config config = (Config)server.getConfig();
        config.setGerritAuthKeyFile(keyFile.getPublicKey());
        config.setGerritHostName("localhost");
        config.setGerritFrontEndURL("http://localhost");
        config.setGerritSshPort(29418);
        config.setGerritProxy("");
        server.startConnection();

        handler = Whitebox.getInternalState(server, GerritHandler.class);
        Collection<GerritEventListener> gerritEventListeners =
                Whitebox.getInternalState(handler, "gerritEventListeners");
View Full Code Here

     */
    public void testIt() throws IOException, InterruptedException {
        jenkins.setCrumbIssuer(null);
        GerritServer server1 = new GerritServer(PluginImpl.DEFAULT_SERVER_NAME);
        PluginImpl.getInstance().addServer(server1);
        Config config = (Config)server1.getConfig();
        config.setGerritFrontEndURL(this.getURL().toString() + "gerrit/");
        config.setUseRestApi(true);
        config.setGerritHttpUserName("user");
        config.setGerritHttpPassword("passwd");
        config.setRestCodeReview(true);
        config.setRestVerified(true);

        server1.start();

        PatchsetCreated event = Setup.createPatchsetCreated(server1.getName());

View Full Code Here

        String mode = req.getParameter("mode");
        if (mode != null && mode.equals("copy")) { //"Copy Existing Server Configuration" has been chosen
            String from = req.getParameter("from");
            GerritServer fromServer = plugin.getServer(from);
            if (fromServer != null) {
                server.setConfig(new Config(fromServer.getConfig()));
                plugin.addServer(server);
                server.start();
            } else {
                throw new Failure("Server '" + from + "' does not exist!");
            }
View Full Code Here

     */
    public GerritServer(String name, boolean noConnectionOnStartup) {
        this.name = name;
        this.pseudoMode = false;
        this.noConnectionOnStartup = noConnectionOnStartup;
        config = new Config();
    }
View Full Code Here

TOP

Related Classes of com.sonyericsson.hudson.plugins.gerrit.trigger.config.Config

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.