Skip to content

Commit 0172e1b

Browse files
committed
Changes from API review:
- Add test_password_file option - Change test_async to test_non_blocking Also: - Add environment variable options for all new options, which is potentially useful at least for test_password
1 parent 2e85b71 commit 0172e1b

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_action.rb

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ def self.run(params)
8888
get_value_from_value_or_file(params[:test_devices], params[:test_devices_file])
8989
if present?(test_devices)
9090
UI.message("🤖 Starting automated tests. Note: This feature is in beta.")
91-
release_test = test_release(alpha_client, release, test_devices, params[:test_username], params[:test_password], params[:test_username_resource], params[:test_password_resource])
92-
unless params[:test_async]
91+
test_password = get_value_from_value_or_file(params[:test_password], params[:test_password_file])
92+
release_test = test_release(alpha_client, release, test_devices, params[:test_username], test_password, params[:test_username_resource], params[:test_password_resource])
93+
unless params[:test_non_blocking]
9394
poll_test_finished(alpha_client, release_test.name)
9495
end
9596
end
@@ -522,23 +523,33 @@ def self.available_options
522523
optional: true,
523524
type: String),
524525
FastlaneCore::ConfigItem.new(key: :test_username,
526+
env_name: "FIREBASEAPPDISTRO_TEST_USERNAME",
525527
description: "Username for automatic login",
526528
optional: true,
527529
type: String),
528530
FastlaneCore::ConfigItem.new(key: :test_password,
529-
description: "Password for automatic login",
531+
env_name: "FIREBASEAPPDISTRO_TEST_PASSWORD",
532+
description: "Password for automatic login. If using a real password consider using test_password_file or setting FIREBASEAPPDISTRO_TEST_PASSWORD to avoid exposing sensitive info.",
530533
optional: true,
531534
type: String),
535+
FastlaneCore::ConfigItem.new(key: :test_password_file,
536+
env_name: "FIREBASEAPPDISTRO_TEST_PASSWORD_FILE",
537+
description: "Path to file containing password for automatic login",
538+
optional: true,
539+
type: String),
532540
FastlaneCore::ConfigItem.new(key: :test_username_resource,
541+
env_name: "FIREBASEAPPDISTRO_TEST_USERNAME_RESOURCE",
533542
description: "Resource name for the username field for automatic login",
534543
optional: true,
535544
type: String),
536545
FastlaneCore::ConfigItem.new(key: :test_password_resource,
546+
env_name: "FIREBASEAPPDISTRO_TEST_PASSWORD_RESOURCE",
537547
description: "Resource name for the password field for automatic login",
538548
optional: true,
539549
type: String),
540-
FastlaneCore::ConfigItem.new(key: :test_async,
541-
description: "Run tests asynchronously. Visit the Firebase console for the automatic test results",
550+
FastlaneCore::ConfigItem.new(key: :test_non_blocking,
551+
env_name: "FIREBASEAPPDISTRO_TEST_NON_BLOCKING",
552+
description: "Run automated tests without waiting for them to finish. Visit the Firebase console for the test results",
542553
optional: false,
543554
default_value: false,
544555
type: Boolean),

spec/firebase_app_distribution_action_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ def stub_get_aab_info(integration_state = 'INTEGRATED')
561561
test_username: 'username',
562562
test_password: 'password',
563563
test_devices: 'model=model1,version=version1,locale=locale1,orientation=orientation1',
564-
test_async: true
564+
test_non_blocking: true
565565
})
566566
end
567567

@@ -580,7 +580,7 @@ def stub_get_aab_info(integration_state = 'INTEGRATED')
580580
test_username: 'username',
581581
test_password: 'password',
582582
test_devices: 'model=model1,version=version1,locale=locale1,orientation=orientation1',
583-
test_async: true
583+
test_non_blocking: true
584584
})
585585
end
586586

@@ -610,7 +610,7 @@ def stub_get_aab_info(integration_state = 'INTEGRATED')
610610
app: android_app_id,
611611
android_artifact_path: 'path/to.apk',
612612
test_devices: devices,
613-
test_async: true
613+
test_non_blocking: true
614614
})
615615
end
616616
end

0 commit comments

Comments
 (0)