1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
From: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
Date: Thu, 2 Feb 2023 06:57:20 -0500
Subject: Remove failing unit tests for Go 1.20 (#2656)
Fixes: #2654.
Origin: backport, https://github.com/google/go-github/commit/ef6c7a6d
---
github/actions_artifacts_test.go | 17 -----------------
github/repos_contents_test.go | 17 -----------------
2 files changed, 34 deletions(-)
diff --git a/github/actions_artifacts_test.go b/github/actions_artifacts_test.go
index 345a087..e35a873 100644
--- a/github/actions_artifacts_test.go
+++ b/github/actions_artifacts_test.go
@@ -368,23 +368,6 @@ func TestActionsService_DownloadArtifact_StatusMovedPermanently_followRedirects(
}
}
-func TestActionsService_DownloadArtifact_invalidLocationHeader(t *testing.T) {
- client, mux, _, teardown := setup()
- defer teardown()
-
- mux.HandleFunc("/repos/o/r/actions/artifacts/1/zip", func(w http.ResponseWriter, r *http.Request) {
- testMethod(t, r, "GET")
- ctlChar := 0x7f
- badURL := "https://google.com" + string(byte(ctlChar))
- w.Header().Add("Location", badURL)
- w.WriteHeader(http.StatusFound)
- })
-
- ctx := context.Background()
- _, _, err := client.Actions.DownloadArtifact(ctx, "o", "r", 1, false)
- testURLParseError(t, err)
-}
-
func TestActionsService_DeleteArtifact(t *testing.T) {
client, mux, _, teardown := setup()
defer teardown()
diff --git a/github/repos_contents_test.go b/github/repos_contents_test.go
index f5de557..8c16d6e 100644
--- a/github/repos_contents_test.go
+++ b/github/repos_contents_test.go
@@ -744,23 +744,6 @@ func TestRepositoriesService_GetArchiveLink_StatusMovedPermanently_followRedirec
}
}
-func TestRepositoriesService_GetArchiveLink_invalidLocationHeader(t *testing.T) {
- client, mux, _, teardown := setup()
- defer teardown()
-
- mux.HandleFunc("/repos/o/r/tarball", func(w http.ResponseWriter, r *http.Request) {
- testMethod(t, r, "GET")
- ctlChar := 0x7f
- badURL := "https://google.com" + string(byte(ctlChar))
- w.Header().Add("Location", badURL)
- w.WriteHeader(http.StatusFound)
- })
-
- ctx := context.Background()
- _, _, err := client.Repositories.GetArchiveLink(ctx, "o", "r", Tarball, &RepositoryContentGetOptions{}, false)
- testURLParseError(t, err)
-}
-
func TestRepositoriesService_GetContents_NoTrailingSlashInDirectoryApiPath(t *testing.T) {
client, mux, _, teardown := setup()
defer teardown()
|