Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
fabrizzio-dotCMS committed Jul 29, 2024
1 parent e8b6d42 commit fb99172
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -385,16 +385,19 @@ void testPushNonFilesMatchingPath() throws IOException {
//Pull down a workspace if empty
commandLine.setOut(out);
final String path = String.format("//%s", "default");
int status = commandLine.execute(FilesCommand.NAME, FilesPull.NAME, path, "--workspace", tempFolder.toString());
int status = commandLine.execute(FilesCommand.NAME, FilesPull.NAME, path, "--workspace",
tempFolder.toString());
Assertions.assertEquals(CommandLine.ExitCode.OK, status);

status = commandLine.execute(FilesCommand.NAME, FilesPush.NAME, "--workspace", tempFolder.toAbsolutePath().toString(), "content-types");
status = commandLine.execute(FilesCommand.NAME, FilesPush.NAME, "--workspace",
tempFolder.toAbsolutePath().toString(), "content-types");
Assertions.assertEquals(CommandLine.ExitCode.OK, status);

Assertions.assertTrue(isDirectoryNotEmpty(tempFolder));

//But if called with a path that doesn't match any files folder in the workspace
status = commandLine.execute(FilesCommand.NAME, FilesPush.NAME, "--workspace", tempFolder.toAbsolutePath().toString(), "non-existing-folder");
status = commandLine.execute(FilesCommand.NAME, FilesPush.NAME, "--workspace",
tempFolder.toAbsolutePath().toString(), "non-existing-folder");
Assertions.assertEquals(ExitCode.SOFTWARE, status);

} finally {
Expand Down

0 comments on commit fb99172

Please sign in to comment.