Repository: firebase/firebase-admin-go
Pull request #378 (2020-06-08 23:06:23)

chore: Updated release flow for modules support
* Updated release workflow config.
* Updated integration test resource path in source.
* Fixed some incomplete error message strings.

Staging job triggered via label for verification.


Patch:
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 3bfccd4..bdd5565 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -36,34 +36,26 @@ jobs:
 
     runs-on: ubuntu-latest
 
-    env:
-      GOPATH: ${{ github.workspace }}/go
-
     # When manually triggering the build, the requester can specify a target branch or a tag
     # via the 'ref' client parameter.
     steps:
-    - name: Check out code into GOPATH
-      uses: actions/checkout@v2
-      with:
-        path: go/src/firebase.google.com/go
-        ref: ${{ github.event.client_payload.ref || github.ref }}
-
     - name: Set up Go
       uses: actions/setup-go@v1
       with:
-        go-version: 1.11
+        go-version: 1.12
 
-    - name: Get dependencies
-      run: go get -t -v $(go list ./... | grep -v integration)
+    - name: Check out code
+      uses: actions/checkout@v2
+      with:
+        ref: ${{ github.event.client_payload.ref || github.ref }}
 
     - name: Run Linter
       run: |
-        echo
-        go get golang.org/x/lint/golint
-        $GOPATH/bin/golint -set_exit_status firebase.google.com/go/...
+        go get -u golang.org/x/lint/golint
+        GOLINT=`go list -f {{.Target}} golang.org/x/lint/golint`
+        $GOLINT -set_exit_status ./...
 
     - name: Run Tests
-      working-directory: ./go/src/firebase.google.com/go
       run: ./.github/scripts/run_all_tests.sh
       env:
         FIREBASE_SERVICE_ACCT_KEY: ${{ secrets.FIREBASE_SERVICE_ACCT_KEY }}
diff --git a/auth/user_mgt.go b/auth/user_mgt.go
index 8fb5a62..5c84ed8 100644
--- a/auth/user_mgt.go
+++ b/auth/user_mgt.go
@@ -1089,7 +1089,7 @@ var serverError = map[string]*authError{
 	},
 	"INVALID_DYNAMIC_LINK_DOMAIN": {
 		code:     internal.InvalidArgument,
-		message:  "",
+		message:  "the provided dynamic link domain is not configured or authorized for the current project",
 		authCode: invalidDynamicLinkDomain,
 	},
 	"PHONE_NUMBER_EXISTS": {
@@ -1099,7 +1099,7 @@ var serverError = map[string]*authError{
 	},
 	"TENANT_NOT_FOUND": {
 		code:     internal.NotFound,
-		message:  "",
+		message:  "tenant with the specified ID does not exist",
 		authCode: tenantNotFound,
 	},
 	"UNAUTHORIZED_DOMAIN": {
diff --git a/integration/internal/internal.go b/integration/internal/internal.go
index 433ecbe..3a7948c 100644
--- a/integration/internal/internal.go
+++ b/integration/internal/internal.go
@@ -18,7 +18,6 @@ package internal
 import (
 	"context"
 	"encoding/json"
-	"go/build"
 	"io/ioutil"
 	"net/http"
 	"path/filepath"
@@ -35,7 +34,7 @@ const apiKeyPath = "integration_apikey.txt"
 
 // Resource returns the absolute path to the specified test resource file.
 func Resource(name string) string {
-	p := []string{build.Default.GOPATH, "src", "firebase.google.com", "go", "testdata", name}
+	p := []string{"..", "..", "testdata", name}
 	return filepath.Join(p...)
 }
 


Test patch:
diff --git a/.github/scripts/run_all_tests.sh b/.github/scripts/run_all_tests.sh
index b52b283..c47961b 100755
--- a/.github/scripts/run_all_tests.sh
+++ b/.github/scripts/run_all_tests.sh
@@ -22,4 +22,4 @@ gpg --quiet --batch --yes --decrypt --passphrase="${FIREBASE_SERVICE_ACCT_KEY}"
 
 echo "${FIREBASE_API_KEY}" > testdata/integration_apikey.txt
 
-go test -v -race firebase.google.com/go/...
+go test -v -race ./...
diff --git a/auth/user_mgt_test.go b/auth/user_mgt_test.go
index c15d6ce..e8393a7 100644
--- a/auth/user_mgt_test.go
+++ b/auth/user_mgt_test.go
@@ -1635,7 +1635,7 @@ func TestHTTPErrorWithCode(t *testing.T) {
 		"INVALID_DYNAMIC_LINK_DOMAIN": {
 			IsInvalidDynamicLinkDomain,
 			errorutils.IsInvalidArgument,
-			"",
+			"the provided dynamic link domain is not configured or authorized for the current project",
 		},
 		"PHONE_NUMBER_EXISTS": {
 			IsPhoneNumberAlreadyExists,