use of com.facebook.buck.testutil.integration.ProjectWorkspace in project buck by facebook.
the class AuditConfigCommandIntegrationTest method testConfigBuckConfigUI.
@Test
public void testConfigBuckConfigUI() throws IOException {
ProjectWorkspace workspace = TestDataHelper.createProjectWorkspaceForScenario(this, "audit_config", tmp);
workspace.setUp();
ProjectWorkspace.ProcessResult result = workspace.runBuckCommand("audit", "config", "missing_section.badvalue", "ignored_section", "ignored_section.dotted.value", "second_section.some_property", "ignored_section.short_value", "ignored_section.long_value");
result.assertSuccess();
assertEquals(workspace.getFileContents("stdout-buckconfig"), result.getStdout());
}
use of com.facebook.buck.testutil.integration.ProjectWorkspace in project buck by facebook.
the class AuditDependenciesCommandIntegrationTest method testJSONOutput.
@Test
public void testJSONOutput() throws IOException {
ProjectWorkspace workspace = TestDataHelper.createProjectWorkspaceForScenario(this, "audit_dependencies", tmp);
workspace.setUp();
// Print all of the inputs to the rule.
ProcessResult result = workspace.runBuckCommand("audit", "dependencies", "--json", "//example:one");
result.assertSuccess();
assertEquals(workspace.getFileContents("stdout-one.json"), result.getStdout());
}
use of com.facebook.buck.testutil.integration.ProjectWorkspace in project buck by facebook.
the class AuditDependenciesCommandIntegrationTest method testTestsThatArentNecessarilyIncludedInOriginalParseAreIncludedInOutput.
@Test
public void testTestsThatArentNecessarilyIncludedInOriginalParseAreIncludedInOutput() throws IOException {
ProjectWorkspace workspace = TestDataHelper.createProjectWorkspaceForScenario(this, "audit_dependencies", tmp);
workspace.setUp();
// Print all of the inputs to the rule.
ProcessResult result = workspace.runBuckCommand("audit", "dependencies", "--include-tests", "--transitive", "//lib/lib1:lib1");
result.assertSuccess();
assertEquals(workspace.getFileContents("stdout-lib1-transitive-tests"), result.getStdout());
}
use of com.facebook.buck.testutil.integration.ProjectWorkspace in project buck by facebook.
the class AuditDependenciesCommandIntegrationTest method testThatJSONOutputWithMultipleInputsIsGroupedByInput.
@Test
public void testThatJSONOutputWithMultipleInputsIsGroupedByInput() throws IOException {
ProjectWorkspace workspace = TestDataHelper.createProjectWorkspaceForScenario(this, "audit_dependencies", tmp);
workspace.setUp();
// Print all of the inputs to the rule.
ProcessResult result = workspace.runBuckCommand("audit", "dependencies", "--json", "//example:two", "//example:three");
result.assertSuccess();
assertEquals(workspace.getFileContents("stdout-two-three.json"), result.getStdout());
}
use of com.facebook.buck.testutil.integration.ProjectWorkspace in project buck by facebook.
the class AuditDependenciesCommandIntegrationTest method testThatTransitiveJSONOutputWithMultipleInputsIsGroupedByInput.
@Test
public void testThatTransitiveJSONOutputWithMultipleInputsIsGroupedByInput() throws IOException {
ProjectWorkspace workspace = TestDataHelper.createProjectWorkspaceForScenario(this, "audit_dependencies", tmp);
workspace.setUp();
// Print all of the inputs to the rule.
ProcessResult result = workspace.runBuckCommand("audit", "dependencies", "--transitive", "--json", "//example:one", "//example:two", "//example:three");
result.assertSuccess();
assertEquals(workspace.getFileContents("stdout-one-two-three-transitive.json"), result.getStdout());
}
Aggregations