Skip to content

Commit

Permalink
[JENKINS-41876] Add test case.
Browse files Browse the repository at this point in the history
  • Loading branch information
nfalco79 committed Feb 12, 2017
1 parent e092acd commit 0c22351
Showing 1 changed file with 6 additions and 4 deletions.
Expand Up @@ -36,22 +36,24 @@ public class NodeJSInstallationTest {
@Test
@Issue("JENKINS-41535")
public void test_load_at_startup() throws Exception {
File jenkinsHome = r.jenkins.getRootDir();
File installationsFile = new File(jenkinsHome, NodeJSInstallation.class.getName() + ".xml");
File installationsFile = getInstallationsFile();

assertTrue("NodeJS installations file has not been copied", installationsFile.exists());
verify();
}

private File getInstallationsFile() {
return new File(r.jenkins.getRootDir(), NodeJSInstallation.class.getName() + ".xml");
}

/**
* Simulates the addition of the new NodeJS via UI and makes sure it works
* and persistent file was created.
*/
@Test
@Issue("JENKINS-41535")
public void test_persist_of_nodejs_installation() throws Exception {
File jenkinsHome = r.jenkins.getRootDir();
File installationsFile = new File(jenkinsHome, NodeJSInstallation.class.getName() + ".xml");
File installationsFile = getInstallationsFile();

assertFalse("NodeJS installations file already exists", installationsFile.exists());

Expand Down

0 comments on commit 0c22351

Please sign in to comment.