use of jenkins.plugins.nodejs.VerifyEnvVariableBuilder.EnvVarVerifier in project nodejs-plugin by jenkinsci.
the class NodeJSCommandInterpreterTest method test_set_of_cache_location.
@Test
public void test_set_of_cache_location() throws Exception {
final File cacheFolder = folder.newFolder();
NodeJSInstallation installation = mockInstaller();
NodeJSCommandInterpreter builder = CIBuilderHelper.createMock("test_creation_of_config", installation);
builder.setCacheLocationStrategy(new TestCacheLocationLocator(cacheFolder));
FreeStyleProject job = j.createFreeStyleProject("cache");
job.getBuildersList().add(builder);
job.getBuildersList().add(new EnvVarVerifier(NodeJSConstants.NPM_CACHE_LOCATION, cacheFolder.getAbsolutePath()));
j.assertBuildStatusSuccess(job.scheduleBuild2(0));
}
use of jenkins.plugins.nodejs.VerifyEnvVariableBuilder.EnvVarVerifier in project nodejs-plugin by jenkinsci.
the class NodeJSBuildWrapperTest method test_set_of_cache_location.
@Test
public void test_set_of_cache_location() throws Exception {
FreeStyleProject job = j.createFreeStyleProject("cache");
final File cacheFolder = fileRule.newFolder();
NodeJSBuildWrapper bw = mockWrapper(mockInstaller());
bw.setCacheLocationStrategy(new TestCacheLocationLocator(cacheFolder));
job.getBuildWrappersList().add(bw);
job.getBuildersList().add(new EnvVarVerifier(NodeJSConstants.NPM_CACHE_LOCATION, cacheFolder.getAbsolutePath()));
j.assertBuildStatusSuccess(job.scheduleBuild2(0));
}
Aggregations