use of com.google.copybara.testing.SkylarkTestExecutor in project copybara by google.
the class AuthoringTest method setUp.
@Before
public void setUp() throws Exception {
OptionsBuilder options = new OptionsBuilder();
console = new TestingConsole();
options.setConsole(console);
skylark = new SkylarkTestExecutor(options);
}
use of com.google.copybara.testing.SkylarkTestExecutor in project copybara by google.
the class BuildozerModifyTest method setup.
@Before
public void setup() throws IOException {
console = new TestingConsole();
options = new OptionsBuilder();
options.setConsole(console);
BuildozerTesting.enable(options);
checkoutDir = Files.createTempDirectory("BuildozerModifyTest");
skylark = new SkylarkTestExecutor(options);
}
use of com.google.copybara.testing.SkylarkTestExecutor in project copybara by google.
the class GerritEndpointTest method setup.
@Before
public void setup() throws Exception {
workdir = Jimfs.newFileSystem().getPath("/");
TestingConsole console = new TestingConsole();
OptionsBuilder options = new OptionsBuilder();
options.setConsole(console).setOutputRootToTmpDir();
dummyTrigger = new DummyTrigger();
options.testingOptions.feedbackTrigger = dummyTrigger;
options.testingOptions.checker = new DummyChecker(ImmutableSet.of("badword"));
gitUtil = new GitTestUtil(options);
Path credentialsFile = Files.createTempFile("credentials", "test");
Files.write(credentialsFile, BASE_URL.getBytes(UTF_8));
GitRepository repo = newBareRepo(Files.createTempDirectory("test_repo"), getGitEnv(), /*verbose=*/
true, DEFAULT_TIMEOUT, /*noVerify=*/
false).init().withCredentialHelper("store --file=" + credentialsFile);
gitUtil.mockRemoteGitRepos(new Validator(), repo);
url = BASE_URL + "/foo/bar";
options.general.starlarkMode = "STRICT";
skylark = new SkylarkTestExecutor(options);
}
use of com.google.copybara.testing.SkylarkTestExecutor in project copybara by google.
the class GitDestinationReaderTest method setup.
@Before
public void setup() throws Exception {
destinationPath = Files.createTempDirectory("destination");
gitDir = Files.createTempDirectory("gitDir");
console = new TestingConsole();
options = new OptionsBuilder().setConsole(console);
options.setHomeDir(Files.createTempDirectory("home").toString());
origin = new DummyOrigin();
options.testingOptions.origin = origin;
repo = GitRepository.newBareRepo(destinationPath, getGitEnv(), /*verbose=*/
true, DEFAULT_TIMEOUT, /*noVerify=*/
false).withWorkTree(gitDir).init();
primaryBranch = repo.getPrimaryBranch();
options.gitDestination.committerEmail = "commiter@email";
options.gitDestination.committerName = "Bara Kopi";
workDir = Files.createTempDirectory("workdir");
options.setWorkdirToRealTempDir(workDir.toString());
skylark = new SkylarkTestExecutor(options);
origin.singleFileChange(1580341755, "first", "foo/origin.txt", "AAAA").singleFileChange(1580341795, "second", "foo/origin.txt", "BBBB");
}
use of com.google.copybara.testing.SkylarkTestExecutor in project copybara by google.
the class GitDestinationTest method setup.
@Before
public void setup() throws Exception {
repoGitDir = Files.createTempDirectory("GitDestinationTest-repoGitDir");
workdir = Files.createTempDirectory("workdir");
console = new TestingConsole();
options = getOptionsBuilder(console);
git("init", "--bare", repoGitDir.toString());
options.gitDestination.committerEmail = "commiter@email";
options.gitDestination.committerName = "Bara Kopi";
destinationFiles = Glob.createGlob(ImmutableList.of("**"));
partialClone = "False";
checker = "None";
url = "file://" + repoGitDir;
skylark = new SkylarkTestExecutor(options);
force = false;
tagName = "test_v1";
tagMsg = "foo_tag";
primaryBranch = repo().getPrimaryBranch();
}
Aggregations