use of com.google.devtools.build.lib.bazel.repository.downloader.HttpDownloader in project bazel by bazelbuild.
the class SkylarkRepositoryContextTest method setUpContextForRule.
protected void setUpContextForRule(Map<String, Object> kwargs, Attribute... attributes) throws Exception {
Package.Builder packageBuilder = Package.newExternalPackageBuilder(Package.Builder.DefaultHelper.INSTANCE, workspaceFile, "runfiles");
FuncallExpression ast = new FuncallExpression(new Identifier("test"), ImmutableList.<Passed>of());
ast.setLocation(Location.BUILTIN);
Rule rule = packageBuilder.externalPackageData().createAndAddRepositoryRule(packageBuilder, buildRuleClass(attributes), null, kwargs, ast);
HttpDownloader downloader = Mockito.mock(HttpDownloader.class);
context = new SkylarkRepositoryContext(rule, outputDirectory, Mockito.mock(SkyFunction.Environment.class), ImmutableMap.of("FOO", "BAR"), downloader, new HashMap<String, String>());
}
Aggregations