未验证 提交 98f669da 编写于 作者: A Abdul Wadood 提交者: GitHub

[sigh] skip cert verification on linux & Windows (#19116)

* Skip certification on Linux and Windows

As the security command isn't present on Linux and Windows

* Add RSpecs for skipping cert validation

* Update match runner_spec.rb RSpecs

Fix them for non-mac platforms

* Move skip to options default
Co-authored-by: NJosh Holtz <me@joshholtz.com>
上级 fc3f025b
......@@ -149,7 +149,8 @@ module Sigh
env_name: "SIGH_SKIP_CERTIFICATE_VERIFICATION",
description: "Skips the verification of the certificates for every existing profiles. This will make sure the provisioning profile can be used on the local machine",
is_string: false,
default_value: false),
default_value: !FastlaneCore::Helper.mac?,
default_value_dynamic: true),
FastlaneCore::ConfigItem.new(key: :platform,
short_option: '-p',
env_name: "SIGH_PLATFORM",
......
......@@ -72,10 +72,12 @@ describe Sigh do
expect(profiles.size).to eq(1)
end
it "without skip verification" do
it "on mac without skip verification" do
expect(FastlaneCore::Helper).to receive(:mac?).and_return(true)
sigh_stub_spaceship_connect(inhouse: false, all_app_identifiers: ["com.krausefx.app"], app_identifier_and_profile_names: { "com.krausefx.app" => ["No dupe here"] })
options = { app_identifier: "com.krausefx.app", skip_certificate_verification: false }
options = { app_identifier: "com.krausefx.app" }
Sigh.config = FastlaneCore::Configuration.create(Sigh::Options.available_options, options)
expect(FastlaneCore::CertChecker).to receive(:installed?).with(anything).and_return(true)
......@@ -83,10 +85,26 @@ describe Sigh do
profiles = fake_runner.fetch_profiles
expect(profiles.size).to eq(1)
end
it "on non-mac without skip verification" do
expect(FastlaneCore::Helper).to receive(:mac?).and_return(false)
sigh_stub_spaceship_connect(inhouse: false, all_app_identifiers: ["com.krausefx.app"], app_identifier_and_profile_names: { "com.krausefx.app" => ["No dupe here"] })
options = { app_identifier: "com.krausefx.app" }
Sigh.config = FastlaneCore::Configuration.create(Sigh::Options.available_options, options)
expect(FastlaneCore::CertChecker).not_to receive(:installed?).with(anything)
profiles = fake_runner.fetch_profiles
expect(profiles.size).to eq(1)
end
end
context "unsuccessfully" do
it "without skip verification" do
it "on mac without skip verification" do
expect(FastlaneCore::Helper).to receive(:mac?).and_return(true)
sigh_stub_spaceship_connect(inhouse: false, all_app_identifiers: ["com.krausefx.app"], app_identifier_and_profile_names: { "com.krausefx.app" => ["No dupe here"] })
options = { app_identifier: "com.krausefx.app", skip_certificate_verification: false }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册