From f87c9c5dc45ad9f46846d6f9265f25ceb2baa4f2 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Wed, 18 Nov 2020 05:54:42 +0100 Subject: [PATCH] Fix tests failing locally. --- .github/workflows/tests.yml | 2 +- Library/Homebrew/dev-cmd/tests.rb | 1 + Library/Homebrew/extend/os/mac/diagnostic.rb | 2 +- Library/Homebrew/test/utils/github_spec.rb | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9e448dfe63..31c821728e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,7 +6,7 @@ on: env: HOMEBREW_DEVELOPER: 1 HOMEBREW_NO_AUTO_UPDATE: 1 - HOMEBREW_GITHUB_ACTIONS_BIG_SUR_TESTING: 1 # TODO: remove when Big Sur is released. + HOMEBREW_BIG_SUR_TESTING: 1 # TODO: remove when Big Sur is released. jobs: tests: if: github.repository == 'Homebrew/brew' diff --git a/Library/Homebrew/dev-cmd/tests.rb b/Library/Homebrew/dev-cmd/tests.rb index c9f47b220a..41a94170b1 100644 --- a/Library/Homebrew/dev-cmd/tests.rb +++ b/Library/Homebrew/dev-cmd/tests.rb @@ -63,6 +63,7 @@ module Homebrew ENV["HOMEBREW_TEST_GENERIC_OS"] = "1" if args.generic? ENV["HOMEBREW_TEST_ONLINE"] = "1" if args.online? ENV["HOMEBREW_SORBET_RUNTIME"] = "1" + ENV["HOMEBREW_BIG_SUR_TESTING"] = "1" ENV["USER"] ||= system_command!("id", args: ["-nu"]).stdout.chomp diff --git a/Library/Homebrew/extend/os/mac/diagnostic.rb b/Library/Homebrew/extend/os/mac/diagnostic.rb index 1e636f15ff..65ed503480 100644 --- a/Library/Homebrew/extend/os/mac/diagnostic.rb +++ b/Library/Homebrew/extend/os/mac/diagnostic.rb @@ -109,7 +109,7 @@ module Homebrew who = +"We" # TODO: remove when Big Sur is supported. what = if MacOS.version == :big_sur - return if ENV["HOMEBREW_GITHUB_ACTIONS_BIG_SUR_TESTING"] + return if ENV["HOMEBREW_BIG_SUR_TESTING"] "released but not yet supported version" elsif OS::Mac.prerelease? diff --git a/Library/Homebrew/test/utils/github_spec.rb b/Library/Homebrew/test/utils/github_spec.rb index 3ee58750d0..1949123d28 100644 --- a/Library/Homebrew/test/utils/github_spec.rb +++ b/Library/Homebrew/test/utils/github_spec.rb @@ -54,7 +54,7 @@ describe GitHub do it "errors on an unauthenticated token" do expect { subject.sponsors_by_tier("Homebrew") - }.to raise_error(/INSUFFICIENT_SCOPES|FORBIDDEN/) + }.to raise_error(/INSUFFICIENT_SCOPES|FORBIDDEN|token needs the 'admin:org' scope/) end end