]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgo/go/compress/gzip/gunzip_test.go
libgo: update to Go1.14beta1
[thirdparty/gcc.git] / libgo / go / compress / gzip / gunzip_test.go
index fdea0c5d5ff82a81130928061b4f674acf9dd9ba..1b01404169265d45833eaae183d03c8de4dc1eb8 100644 (file)
@@ -7,6 +7,7 @@ package gzip
 import (
        "bytes"
        "compress/flate"
+       "encoding/base64"
        "io"
        "io/ioutil"
        "os"
@@ -413,11 +414,16 @@ func TestDecompressor(t *testing.T) {
 }
 
 func TestIssue6550(t *testing.T) {
-       f, err := os.Open("testdata/issue6550.gz")
+       // Appleā€™s notarization service will recursively attempt to decompress
+       // files in order to find binaries to notarize. Since the service is
+       // unable to decompress this file, it may reject the entire toolchain. Use a
+       // base64-encoded version to avoid this.
+       // See golang.org/issue/34986
+       f, err := os.Open("testdata/issue6550.gz.base64")
        if err != nil {
                t.Fatal(err)
        }
-       gzip, err := NewReader(f)
+       gzip, err := NewReader(base64.NewDecoder(base64.StdEncoding, f))
        if err != nil {
                t.Fatalf("NewReader(testdata/issue6550.gz): %v", err)
        }