comment out syscall usage

pull/6757/head
Karuppiah Natarajan 5 years ago
parent 851e7fc314
commit 8ee955c5a1
No known key found for this signature in database
GPG Key ID: C674A28337662A96

@ -23,7 +23,6 @@ import (
"io/ioutil" "io/ioutil"
"os" "os"
"path/filepath" "path/filepath"
"syscall"
"testing" "testing"
"github.com/pkg/errors" "github.com/pkg/errors"
@ -193,10 +192,10 @@ func TestExtract(t *testing.T) {
defer os.RemoveAll(tempDir) defer os.RemoveAll(tempDir)
// Set the umask to default open permissions so we can actually test // Set the umask to default open permissions so we can actually test
oldmask := syscall.Umask(0000) // oldmask := syscall.Umask(0000)
defer func() { // defer func() {
syscall.Umask(oldmask) // syscall.Umask(oldmask)
}() // }()
// Write a tarball to a buffer for us to extract // Write a tarball to a buffer for us to extract
var tarbuf bytes.Buffer var tarbuf bytes.Buffer
@ -206,7 +205,7 @@ func TestExtract(t *testing.T) {
Mode int64 Mode int64
}{ }{
{"plugin.yaml", "plugin metadata", 0600}, {"plugin.yaml", "plugin metadata", 0600},
{"README.md", "some text", 0777}, {"README.md", "some text", 0755},
} }
for _, file := range files { for _, file := range files {
hdr := &tar.Header{ hdr := &tar.Header{
@ -272,10 +271,9 @@ func TestExtract(t *testing.T) {
t.Fatalf("Expected %s to exist but doesn't", readmeFullPath) t.Fatalf("Expected %s to exist but doesn't", readmeFullPath)
} }
t.Fatal(err) t.Fatal(err)
} else if info.Mode().Perm() != 0777 { } else if info.Mode().Perm() != 0755 {
t.Fatalf("Expected %s to have 0777 mode it but has %o", readmeFullPath, info.Mode().Perm()) t.Fatalf("Expected %s to have 0755 mode it but has %o", readmeFullPath, info.Mode().Perm())
} }
} }
func TestCleanJoin(t *testing.T) { func TestCleanJoin(t *testing.T) {

Loading…
Cancel
Save