Class ExistingJenkinsController

java.lang.Object
org.jenkinsci.test.acceptance.controller.JenkinsController
org.jenkinsci.test.acceptance.controller.ExistingJenkinsController
All Implemented Interfaces:
Closeable, AutoCloseable, IJenkinsController, AutoCleaned

public class ExistingJenkinsController extends JenkinsController
Run test against existing Jenkins instance.
Author:
Kohsuke Kawaguchi
  • Constructor Details

    • ExistingJenkinsController

      public ExistingJenkinsController(com.google.inject.Injector i, String url)
    • ExistingJenkinsController

      public ExistingJenkinsController(com.google.inject.Injector i, String url, @CheckForNull org.apache.http.auth.Credentials initialCredentials, boolean skipCheck)
  • Method Details

    • startNow

      public void startNow()
      Description copied from class: JenkinsController
      Synchronously start Jenkins instance until it starts responding to the specified URL.
      Specified by:
      startNow in class JenkinsController
    • stopNow

      public void stopNow()
      Description copied from class: JenkinsController
      Synchronously shutdown Jenkins instance.

      This method must leave JENKINS_HOME intact so that it can be started later. To really delete the data and clean up, see JenkinsController.tearDown().

      Specified by:
      stopNow in class JenkinsController
    • populateJenkinsHome

      public void populateJenkinsHome(byte[] template, boolean clean) throws IOException
      Description copied from interface: IJenkinsController
      Populates the Jenkins Home with the specified ZIP template. Jenkins will not be restarted, so if the content would require a restart you have to do this yourself.
      Parameters:
      template - The template (ZIP format).
      clean - if true then the home will be wiped clean before the template is applied. If false then the template will simply overwrite the existing (if any) home.
      Throws:
      IOException
    • getUrl

      public URL getUrl()
      Description copied from class: JenkinsController
      Gives URL where Jenkins is listening. Must end with "/"
      Specified by:
      getUrl in interface IJenkinsController
      Specified by:
      getUrl in class JenkinsController
    • getInitialCredentials

      @CheckForNull public org.apache.http.auth.Credentials getInitialCredentials()
      Overrides:
      getInitialCredentials in class JenkinsController
    • tearDown

      public void tearDown()
      Description copied from class: JenkinsController
      Assuming the instance had already stopped, destroy JENKINS_HOME and release resources used by Jenkins.
      Specified by:
      tearDown in class JenkinsController