π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Use testing Chdir helper
Manav Rathie92a42def833
diff --git a/server/internal/testutil/testutil.go b/server/internal/testutil/testutil.goindex 4571f4b6fa..06cd6392b7 100644--- a/server/internal/testutil/testutil.go+++ b/server/internal/testutil/testutil.go@@ -163,23 +163,8 @@ func verifySafeTestDB(db *sql.DB) error {func WithServerRoot(t *testing.T) {t.Helper()serverRootMu.Lock()-- originalWD, err := os.Getwd()- if err != nil {- serverRootMu.Unlock()- t.Fatalf("failed to get cwd: %v", err)- }- if err := os.Chdir(serverRootPath()); err != nil {- serverRootMu.Unlock()- t.Fatalf("failed to chdir to server root: %v", err)- }-- t.Cleanup(func() {- if err := os.Chdir(originalWD); err != nil {- t.Errorf("failed to restore cwd: %v", err)- }- serverRootMu.Unlock()- })+ t.Cleanup(serverRootMu.Unlock)+ t.Chdir(serverRootPath())}func SecretEncryptionKey() []byte {