Oben Sonne avatar Oben Sonne committed 72870f7

Sort managed items (makes tests more solid)

Comments (0)

Files changed (2)

             _items_cached = gk.find_items_sync(ITYPE, GENCFS_ATTR)
         except gk.NoMatchError:
             _items_cached = []
+        _items_cached.sort(key=lambda x: x.attributes["mount-point"])
 
     match = []
     for item in _items_cached:
   mount at login : yes
 # EXPECT: succeeding add (2)
 # EXPECT: 2 listed items (1,2)
-* encfs path     : ./tenv/e2
-  mount point    : ./tenv/m2
-  mount at login : yes
 * encfs path     : ./tenv/e1
   mount point    : ./tenv/m1
   mount at login : yes
-# EXPECT: succeeding add (3a)
-# EXPECT: 3 listed items (1,2,3a)
-* encfs path     : ./tenv/e3
-  mount point    : ./tenv/m3a
-  mount at login : yes
 * encfs path     : ./tenv/e2
   mount point    : ./tenv/m2
   mount at login : yes
+# EXPECT: succeeding add (3a)
+# EXPECT: 3 listed items (1,2,3a)
 * encfs path     : ./tenv/e1
   mount point    : ./tenv/m1
   mount at login : yes
-# EXPECT: succeeding add (3b)
-# EXPECT: 4 listed items (1,2,3a,3b)
-* encfs path     : ./tenv/e3
-  mount point    : ./tenv/m3b
+* encfs path     : ./tenv/e2
+  mount point    : ./tenv/m2
   mount at login : yes
 * encfs path     : ./tenv/e3
   mount point    : ./tenv/m3a
   mount at login : yes
-* encfs path     : ./tenv/e2
-  mount point    : ./tenv/m2
-  mount at login : yes
+# EXPECT: succeeding add (3b)
+# EXPECT: 4 listed items (1,2,3a,3b)
 * encfs path     : ./tenv/e1
   mount point    : ./tenv/m1
   mount at login : yes
-# EXPECT: 2 succeeding mounts (3a,3b)
-Mounting ./tenv/m3b: OK
-Mounting ./tenv/m3a: OK
-# EXPECT: 2 mounted paths (3a,3b)
-encfs on ./tenv/m3b type fuse.encfs (rw,nosuid,nodev,default_permissions,)
-encfs on ./tenv/m3a type fuse.encfs (rw,nosuid,nodev,default_permissions,)
-# EXPECT: no mounted paths - all unmounted
-# EXPECT: 4 succeeding mounts (1,2,3a,3b)
-Mounting ./tenv/m3b: OK
-Mounting ./tenv/m3a: OK
-Mounting ./tenv/m2: OK
-Mounting ./tenv/m1: OK
-# EXPECT: 4 mounted paths (1,2,3a,3b)
-encfs on ./tenv/m3b type fuse.encfs (rw,nosuid,nodev,default_permissions,)
-encfs on ./tenv/m3a type fuse.encfs (rw,nosuid,nodev,default_permissions,)
-encfs on ./tenv/m2 type fuse.encfs (rw,nosuid,nodev,default_permissions,)
-encfs on ./tenv/m1 type fuse.encfs (rw,nosuid,nodev,default_permissions,)
-# EXPECT: 4 failing mounts - already mounted
-Mounting ./tenv/m3b: mount point already in use
-Mounting ./tenv/m3a: mount point already in use
-Mounting ./tenv/m2: mount point already in use
-Mounting ./tenv/m1: mount point already in use
-# EXPECT: no mounted paths - all unmounted
-# EXPECT: 3 items (1,2,3b)
-* encfs path     : ./tenv/e3
-  mount point    : ./tenv/m3b
-  mount at login : yes
 * encfs path     : ./tenv/e2
   mount point    : ./tenv/m2
   mount at login : yes
+* encfs path     : ./tenv/e3
+  mount point    : ./tenv/m3a
+  mount at login : yes
+* encfs path     : ./tenv/e3
+  mount point    : ./tenv/m3b
+  mount at login : yes
+# EXPECT: 2 succeeding mounts (3a,3b)
+Mounting ./tenv/m3a: OK
+Mounting ./tenv/m3b: OK
+# EXPECT: 2 mounted paths (3a,3b)
+encfs on ./tenv/m3a type fuse.encfs (rw,nosuid,nodev,default_permissions,)
+encfs on ./tenv/m3b type fuse.encfs (rw,nosuid,nodev,default_permissions,)
+# EXPECT: no mounted paths - all unmounted
+# EXPECT: 4 succeeding mounts (1,2,3a,3b)
+Mounting ./tenv/m1: OK
+Mounting ./tenv/m2: OK
+Mounting ./tenv/m3a: OK
+Mounting ./tenv/m3b: OK
+# EXPECT: 4 mounted paths (1,2,3a,3b)
+encfs on ./tenv/m1 type fuse.encfs (rw,nosuid,nodev,default_permissions,)
+encfs on ./tenv/m2 type fuse.encfs (rw,nosuid,nodev,default_permissions,)
+encfs on ./tenv/m3a type fuse.encfs (rw,nosuid,nodev,default_permissions,)
+encfs on ./tenv/m3b type fuse.encfs (rw,nosuid,nodev,default_permissions,)
+# EXPECT: 4 failing mounts - already mounted
+Mounting ./tenv/m1: mount point already in use
+Mounting ./tenv/m2: mount point already in use
+Mounting ./tenv/m3a: mount point already in use
+Mounting ./tenv/m3b: mount point already in use
+# EXPECT: no mounted paths - all unmounted
+# EXPECT: 3 items (1,2,3b)
 * encfs path     : ./tenv/e1
   mount point    : ./tenv/m1
   mount at login : yes
-# EXPECT: 3 items (1,2,3a)
-* encfs path     : ./tenv/e3
-  mount point    : ./tenv/m3a
-  mount at login : yes
 * encfs path     : ./tenv/e2
   mount point    : ./tenv/m2
   mount at login : yes
+* encfs path     : ./tenv/e3
+  mount point    : ./tenv/m3b
+  mount at login : yes
+# EXPECT: 3 items (1,2,3a)
 * encfs path     : ./tenv/e1
   mount point    : ./tenv/m1
   mount at login : yes
-# EXPECT: 3 items (1,2,3a)
-* encfs path     : ./tenv/e3
-  mount point    : ./tenv/m3a
-  mount at login : yes
 * encfs path     : ./tenv/e2
   mount point    : ./tenv/m2
   mount at login : yes
+* encfs path     : ./tenv/e3
+  mount point    : ./tenv/m3a
+  mount at login : yes
+# EXPECT: 3 items (1,2,3a)
 * encfs path     : ./tenv/e1
   mount point    : ./tenv/m1
   mount at login : yes
+* encfs path     : ./tenv/e2
+  mount point    : ./tenv/m2
+  mount at login : yes
+* encfs path     : ./tenv/e3
+  mount point    : ./tenv/m3a
+  mount at login : yes
 # EXPECT: 1 failing mount (3a) - wrong password
 Error decoding volume key, password incorrect
 Mounting ./tenv/m3a: FAILED
 # EXPECT: no mounted paths
 # EXPECT: 3 items (1,2,3b)
-* encfs path     : ./tenv/e3
-  mount point    : ./tenv/m3b
+* encfs path     : ./tenv/e1
+  mount point    : ./tenv/m1
   mount at login : yes
 * encfs path     : ./tenv/e2
   mount point    : ./tenv/m2
   mount at login : yes
-* encfs path     : ./tenv/e1
-  mount point    : ./tenv/m1
+* encfs path     : ./tenv/e3
+  mount point    : ./tenv/m3b
   mount at login : yes
 # EXPECT: 1 succeeding mount (3b)
 Mounting ./tenv/m3b: OK
 # EXPECT: failing edit (3b->2) - mount point in use
 Warning: mount point already in use
 # EXPECT: 3 items (1,2,3b)
-* encfs path     : ./tenv/e3
-  mount point    : ./tenv/m3b
+* encfs path     : ./tenv/e1
+  mount point    : ./tenv/m1
   mount at login : yes
 * encfs path     : ./tenv/e2
   mount point    : ./tenv/m2
   mount at login : yes
-* encfs path     : ./tenv/e1
-  mount point    : ./tenv/m1
+* encfs path     : ./tenv/e3
+  mount point    : ./tenv/m3b
   mount at login : yes
 # EXPECT: autostart on
 autostart on
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.