diff --git a/composer/spec/dependabot/composer/file_updater/lockfile_updater_spec.rb b/composer/spec/dependabot/composer/file_updater/lockfile_updater_spec.rb index 15968eecd4c..1136a706381 100644 --- a/composer/spec/dependabot/composer/file_updater/lockfile_updater_spec.rb +++ b/composer/spec/dependabot/composer/file_updater/lockfile_updater_spec.rb @@ -455,6 +455,7 @@ end context "with good credentials" do + let(:gemfury_deploy_token) { ENV.fetch("GEMFURY_DEPLOY_TOKEN", nil) } let(:credentials) do [{ "type" => "git_source", @@ -464,12 +465,13 @@ }, { "type" => "composer_repository", "registry" => "php.fury.io", - "username" => "yFu9PBmw1HxNjFB818TW", # Throwaway account + "username" => gemfury_deploy_token, "password" => "" }] end it "has details of the updated item" do + skip("skipped because env var GEMFURY_DEPLOY_TOKEN is not set") if gemfury_deploy_token.nil? expect(updated_lockfile_content).to include("\"version\":\"2.2.0\"") end end diff --git a/composer/spec/dependabot/composer/update_checker_spec.rb b/composer/spec/dependabot/composer/update_checker_spec.rb index d0a8143033a..de143ccf3d9 100644 --- a/composer/spec/dependabot/composer/update_checker_spec.rb +++ b/composer/spec/dependabot/composer/update_checker_spec.rb @@ -330,6 +330,7 @@ end context "with good credentials" do + let(:gemfury_deploy_token) { ENV.fetch("GEMFURY_DEPLOY_TOKEN", nil) } let(:credentials) do [{ "type" => "git_source", @@ -339,12 +340,15 @@ }, { "type" => "composer_repository", "registry" => "php.fury.io", - "username" => "yFu9PBmw1HxNjFB818TW", # Throwaway account + "username" => gemfury_deploy_token, "password" => "" }] end - it { is_expected.to be >= Gem::Version.new("2.2.0") } + it "returns the expected version" do + skip("skipped because env var GEMFURY_DEPLOY_TOKEN is not set") if gemfury_deploy_token.nil? + is_expected.to be >= Gem::Version.new("2.2.0") + end end context "with bad credentials" do diff --git a/hex/spec/dependabot/hex/update_checker_spec.rb b/hex/spec/dependabot/hex/update_checker_spec.rb index e849fb6558a..d5e75957947 100644 --- a/hex/spec/dependabot/hex/update_checker_spec.rb +++ b/hex/spec/dependabot/hex/update_checker_spec.rb @@ -275,6 +275,7 @@ end context "with good credentials" do + let(:hex_pm_org_token) { ENV.fetch("HEX_PM_ORGANIZATION_TOKEN", nil) } let(:credentials) do [{ "type" => "git_source", @@ -284,11 +285,14 @@ }, { "type" => "hex_organization", "organization" => "dependabot", - "token" => "b6294cd1e1cf158e9f65ea6b02a9a1ec" + "token" => hex_pm_org_token }] end - it { is_expected.to eq(Gem::Version.new("1.1.0")) } + it "returns the expected version" do + skip("skipped because env var HEX_PM_ORGANIZATION_TOKEN is not set") if hex_pm_org_token.nil? + is_expected.to eq(Gem::Version.new("1.1.0")) + end end context "with bad credentials" do