From d0b15cec49a41ec1ea51890ac7b7c8cb8515f6a4 Mon Sep 17 00:00:00 2001 From: Fabian Henneke Date: Mon, 24 Aug 2020 12:03:33 +0200 Subject: Improve Git server config activity (#1051) --- app/src/androidTest/java/com/zeapo/pwdstore/MigrationsTest.kt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'app/src/androidTest') diff --git a/app/src/androidTest/java/com/zeapo/pwdstore/MigrationsTest.kt b/app/src/androidTest/java/com/zeapo/pwdstore/MigrationsTest.kt index d1b04fc3..c87bdae3 100644 --- a/app/src/androidTest/java/com/zeapo/pwdstore/MigrationsTest.kt +++ b/app/src/androidTest/java/com/zeapo/pwdstore/MigrationsTest.kt @@ -8,6 +8,8 @@ package com.zeapo.pwdstore import android.content.Context import androidx.core.content.edit +import com.zeapo.pwdstore.git.config.ConnectionMode +import com.zeapo.pwdstore.git.config.Protocol import com.zeapo.pwdstore.utils.PreferenceKeys import com.zeapo.pwdstore.utils.getString import com.zeapo.pwdstore.utils.sharedPrefs @@ -33,7 +35,8 @@ class MigrationsTest { putString(PreferenceKeys.GIT_REMOTE_USERNAME, "msfjarvis") putString(PreferenceKeys.GIT_REMOTE_LOCATION, "/mnt/disk3/pass-repo") putString(PreferenceKeys.GIT_REMOTE_SERVER, "192.168.0.102") - putString(PreferenceKeys.GIT_REMOTE_PROTOCOL, "ssh://") + putString(PreferenceKeys.GIT_REMOTE_PROTOCOL, Protocol.Ssh.pref) + putString(PreferenceKeys.GIT_REMOTE_AUTH, ConnectionMode.Password.pref) } runMigrations(context) checkOldKeysAreRemoved(context) @@ -51,7 +54,8 @@ class MigrationsTest { putString(PreferenceKeys.GIT_REMOTE_USERNAME, "msfjarvis") putString(PreferenceKeys.GIT_REMOTE_LOCATION, "/mnt/disk3/pass-repo") putString(PreferenceKeys.GIT_REMOTE_SERVER, "192.168.0.102") - putString(PreferenceKeys.GIT_REMOTE_PROTOCOL, "ssh://") + putString(PreferenceKeys.GIT_REMOTE_PROTOCOL, Protocol.Ssh.pref) + putString(PreferenceKeys.GIT_REMOTE_AUTH, ConnectionMode.SshKey.pref) } runMigrations(context) checkOldKeysAreRemoved(context) @@ -69,7 +73,8 @@ class MigrationsTest { putString(PreferenceKeys.GIT_REMOTE_USERNAME, "msfjarvis") putString(PreferenceKeys.GIT_REMOTE_LOCATION, "Android-Password-Store/pass-test") putString(PreferenceKeys.GIT_REMOTE_SERVER, "github.com") - putString(PreferenceKeys.GIT_REMOTE_PROTOCOL, "https://") + putString(PreferenceKeys.GIT_REMOTE_PROTOCOL, Protocol.Https.pref) + putString(PreferenceKeys.GIT_REMOTE_AUTH, ConnectionMode.None.pref) } runMigrations(context) checkOldKeysAreRemoved(context) -- cgit v1.2.3