Package org.syncany.tests.util

Examples of org.syncany.tests.util.TestClient.down()


    clientA.down();

    clientA.cleanup();

    clientA.down();
    clientC.down();

    // Tear down
    clientA.deleteTestData();
    clientB.deleteTestData();
    clientC.deleteTestData();
View Full Code Here


    clientB.cleanup(cleanupMergeAndRemoveOldFiles);

    FileUtils.copyDirectory(testConnection.getPath(), new File(testConnection.getPath() + "_2_after_cleanup"));
    FileUtils.copyDirectory(clientB.getConfig().getDatabaseDir(), new File(clientB.getConfig().getAppDir(), "2_after_cleanup"));

    clientC.down(); // <<< "Cannot determine file content for checksum X"

    // Tear down
    clientA.deleteTestData();
    clientB.deleteTestData();
    clientC.deleteTestData();
View Full Code Here

    clientB.cleanup(cleanupMergeAndRemoveOldFiles);

    FileUtils.copyDirectory(testConnection.getPath(), new File(testConnection.getPath() + "_6_after_cleanup"));
    FileUtils.copyDirectory(clientB.getConfig().getDatabaseDir(), new File(clientB.getConfig().getAppDir(), "6_after_cleanup"));

    clientE.down(); // If this doesn't crash that's a win!

    // Tear down
    clientA.deleteTestData();
    clientB.deleteTestData();
    clientC.deleteTestData();
View Full Code Here

    // Run
    clientA.createNewFolder("folder");
    clientA.createNewFile("folder/file");
    clientA.upWithForceChecksum();   
   
    clientB.down();
    assertFileListEquals(clientA.getLocalFilesExcludeLockedAndNoRead(), clientB.getLocalFilesExcludeLockedAndNoRead());
    assertSqlDatabaseEquals(clientA.getDatabaseFile(), clientB.getDatabaseFile());
   
    clientA.changeFile("folder/file");
    clientA.upWithForceChecksum();
View Full Code Here

   
    clientA.changeFile("folder/file");
    clientA.upWithForceChecksum();
   
    clientB.deleteFile("folder/file");
    clientB.down();
    assertTrue(clientB.getLocalFile("folder/file").exists());

    // Tear down
    clientA.deleteTestData();
    clientB.deleteTestData();
View Full Code Here

    // A new/up
    clientA.createNewFile("A-original");
    clientA.up();
   
    // B down/move/up
    clientB.down();
    assertFileListEquals(clientA.getLocalFilesExcludeLockedAndNoRead(), clientB.getLocalFilesExcludeLockedAndNoRead());
    assertSqlDatabaseEquals(clientA.getDatabaseFile(), clientB.getDatabaseFile());
   
    clientB.moveFile("A-original", "B-moved");
    clientB.up();
View Full Code Here

   
    clientA.moveFile("B-moved", "A-moved");
    clientA.up();
   
    // B down only
    clientB.down();
    assertFileListEquals(clientA.getLocalFilesExcludeLockedAndNoRead(), clientB.getLocalFilesExcludeLockedAndNoRead());
    assertSqlDatabaseEquals(clientA.getDatabaseFile(), clientB.getDatabaseFile());
   
    // A down/move/up
    clientA.down();
View Full Code Here

   
    clientA.moveFile("A-moved", "A-moved-again");
    clientA.up();
   
    // B down/move/up
    clientB.down();
    assertFileListEquals(clientA.getLocalFilesExcludeLockedAndNoRead(), clientB.getLocalFilesExcludeLockedAndNoRead());
    assertSqlDatabaseEquals(clientA.getDatabaseFile(), clientB.getDatabaseFile());
   
    clientB.moveFile("A-moved-again", "B-moved"); // same filename as above!
    clientB.up();
View Full Code Here

    // B: Change file.jpg (second step in creating a conflict)
    clientB.changeFile("file.jpg");
    clientB.up(noCleanupAndForceUpOperationOptions); // << creates conflict

    // B: Sync down (creates a local conflict file and marks local changes as DRITY)
    clientB.down(); // << creates DIRTY database entries

    // B: Cleanup
    CleanupOperationResult cleanupOperationResult = clientB.cleanup(removeOldCleanupOperationOptions);
    assertEquals(CleanupResultCode.NOK_DIRTY_LOCAL, cleanupOperationResult.getResultCode());
    assertEquals(0, cleanupOperationResult.getMergedDatabaseFilesCount());
View Full Code Here

    // 3. Call B.cleanup(); this does not run, because of the leftover 'action' file
    CleanupOperationResult cleanupOperationResultB = clientB.cleanup();
    assertEquals(CleanupResultCode.NOK_OTHER_OPERATIONS_RUNNING, cleanupOperationResultB.getResultCode());

    // 4. Call B.down(); this does not deliver any results, because no databases have been uploaded
    DownOperationResult downOperationResult = clientB.down();
    assertEquals(DownResultCode.OK_NO_REMOTE_CHANGES, downOperationResult.getResultCode());

    // 5. Call 'up' again, this uploads previously crashed stuff, and then runs cleanup.
    // The cleanup then removes the old multichunk and the old action files.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.