Skip to content

Instantly share code, notes, and snippets.

@come-maiz
Last active April 6, 2017 17:20
Show Gist options
  • Save come-maiz/bd8647ae25407804bf3936157302dc6b to your computer and use it in GitHub Desktop.
Save come-maiz/bd8647ae25407804bf3936157302dc6b to your computer and use it in GitHub Desktop.
Syncthing snap testing

Smoke tests for the Syncthing snap

(based on https://docs.syncthing.net/intro/getting-started.html)

The tests require to two machines.

First, instal the snap:

$ sudo snap install syncthing --candidate

Start syncthing in both machines:

$ syncthing
monitor] 18:37:58 INFO: Log output saved to file "/syncthing.log"
[monitor] 18:37:58 INFO: Starting syncthing
[...]

Open the admin GUI in both machines:

$ sensible-browser https://localhost:8384/

Make a default folder:

In both machines:

  1. Click the Default Folder box.
  2. Click the Edit button.
  3. In the Edit Folder dialog, click the Remove button.
  4. Click the Add Folder button.
  5. Enter Default as the Folder Label.
  6. Enter default as the Folder ID.
  7. Enter ~/Sync as the Folder Path.
  8. Click the Save button.

Add machines:

  1. In machine 1, go to Actions > Show ID.
  2. In machine 2, click the Add Remote Device button.
  3. Copy the Device ID from machine 1 to machien 2.
  4. Enter machine 1 as Device Name.
  5. Check the Default checkbox.
  6. Click the Save button.
  7. In machine 1, close the dialog.
    • Wait until a message appears because of the new device added.
  8. Click the Add Device button.
  9. In the Add Device dialog, enter machine 2 as Device Name.
  10. Check the Default checkbox.
  11. Click the Save button.

Share a file:

  1. In machine 1: $ echo "hola syncthing" > ~/snap/syncthing/x1/Sync/test
  2. Click the Rescan All button. Wait for machine 2 to be Up to Date.
  3. In machine 2: $ cat > ~/snap/syncthing/x1/Sync/test hola syncthing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment