use of org.neo4j.cli.ExecutionContext in project neo4j by neo4j.
the class CheckConsistencyCommandIT method canRunOnBackup.
@Test
void canRunOnBackup() throws Exception {
ConsistencyCheckService consistencyCheckService = mock(ConsistencyCheckService.class);
DatabaseLayout backupLayout = Neo4jLayout.ofFlat(testDirectory.directory("backup")).databaseLayout(DEFAULT_DATABASE_NAME);
prepareBackupDatabase(backupLayout);
CheckConsistencyCommand checkConsistencyCommand = new CheckConsistencyCommand(new ExecutionContext(homeDir, confPath), consistencyCheckService);
when(consistencyCheckService.runFullConsistencyCheck(eq(backupLayout), any(Config.class), any(ProgressMonitorFactory.class), any(LogProvider.class), any(FileSystemAbstraction.class), eq(false), any(), any(ConsistencyFlags.class))).thenReturn(ConsistencyCheckService.Result.success(null, null));
CommandLine.populateCommand(checkConsistencyCommand, "--backup=" + backupLayout.databaseDirectory());
checkConsistencyCommand.execute();
verify(consistencyCheckService).runFullConsistencyCheck(eq(backupLayout), any(Config.class), any(ProgressMonitorFactory.class), any(LogProvider.class), any(FileSystemAbstraction.class), eq(false), any(), any(ConsistencyFlags.class));
}
use of org.neo4j.cli.ExecutionContext in project neo4j by neo4j.
the class PushToCloudCommandTest method setUp.
@BeforeAll
void setUp() throws IOException {
homeDir = directory.directory("home-dir");
Path configDir = directory.directory("config-dir");
Path configFile = configDir.resolve("neo4j.conf");
Files.createFile(configFile);
PrintStream nullOutputStream = new PrintStream(NullOutputStream.nullOutputStream());
ctx = new ExecutionContext(homeDir, configDir, nullOutputStream, nullOutputStream, directory.getFileSystem());
createDbAndDump();
}
use of org.neo4j.cli.ExecutionContext in project neo4j by neo4j.
the class HttpCopierTest method setup.
@BeforeEach
public void setup() {
wireMock = new WireMockServer(TEST_PORT);
wireMock.start();
Path dir = directory.homePath();
PrintStream out = new PrintStream(NULL_OUTPUT_STREAM);
ctx = new ExecutionContext(dir, dir, out, out, fs);
}
Aggregations