1) warn user that espresso tests delete contacts

2) don't leak verification code in logs

// FREEBIE
This commit is contained in:
Rhodey Orbits 2015-05-28 11:38:02 -07:00 committed by Moxie Marlinspike
parent 26f77bd00f
commit d6a970133e
2 changed files with 8 additions and 3 deletions

View File

@ -244,7 +244,12 @@ if (propFile.canRead()){
android.buildTypes.release.signingConfig = null
}
if (project.hasProperty('espresso')) {
if (project.hasProperty('espresso') && System.console() != null) {
println '____________________WARNING_____________________'
println 'ALL YOUR CONTACTS WILL BE DELETED IN THE PROCESS'
println 'OF RUNNING THESE TESTS, TYPE ENTER TO CONTINUE'
System.console().readLine(':')
android.productFlavors {
base {}
espresso {

View File

@ -108,7 +108,7 @@ public class TextSecureEspressoTestCase<T extends Activity> extends ActivityInst
pstnNumber = pstnString.split(":")[1];
verificationCode = RegistrationBypassUtil.getVerificationCodeForPstnString(context, pstnString);
Log.d(TAG, "using pstn id of " + pstnString + " with verification code " + verificationCode);
Log.d(TAG, "using pstn string of " + pstnString);
}
@Override