Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestScripts/env_var_with_go doesn't take into account GOPROXY=DIRECT #76

Open
eclipseo opened this issue Jul 29, 2019 · 0 comments
Open

Comments

@eclipseo
Copy link

Fedora Rawhide, Go 1.13, GOPROXY set to DIRECT:

Testing    in: /builddir/build/BUILD/go-internal-1.3.0/_build/src
         PATH: /builddir/build/BUILD/go-internal-1.3.0/_build/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
       GOPATH: /builddir/build/BUILD/go-internal-1.3.0/_build:/usr/share/gocode
  GO111MODULE: off
      command: go test -buildmode pie -compiler gc -ldflags "-X github.com/rogpeppe/go-internal/version=1.3.0 -extldflags '-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '"
      testing: github.com/rogpeppe/go-internal
github.com/rogpeppe/go-internal/cache
PASS
ok  	github.com/rogpeppe/go-internal/cache	1.567s
github.com/rogpeppe/go-internal/cmd/testscript
--- FAIL: TestScripts (0.05s)
    --- FAIL: TestScripts/env_var_with_go (0.06s)
        testscript.go:308: 
            # Test passing environment variables to scripts with the go command on PATH
            #
            # Below where we check the output of testscript -v, we have to match against
            # the string literal $WORK because testscript rewrites the actual directory
            # to $WORK. Hence we don't want to expand this script's $WORK in such a comparison.
            #
            # This is the counterpart to env_var_no_go.txt (0.000s)
            # Baseline (0.056s)
            > testscript -v noproxy.txt
            [stdout]
            
            WORK=$WORK
            PATH=/builddir/build/BUILD/go-internal-1.3.0/_build/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
            HOME=/no-home
            TMPDIR=$WORK/tmp
            devnull=/dev/null
            :=:
            exe=
            GOPATH=$WORK/gopath
            CCACHE_DISABLE=1
            GOARCH=amd64
            GOOS=linux
            GOROOT=/usr/lib/golang
            GOCACHE=/builddir/.cache/go-build
            GOPROXY=direct
            goversion=1.13
            
            > env BANANA
            BANANA=
            > env GOPATH
            GOPATH=$WORK/gopath
            > env GOPROXY
            GOPROXY=direct
            PASS
            > stdout ^BANANA=$
            > stdout '^GOPATH=\$WORK[/\\]gopath'$
            > stdout ^GOPROXY=$
            FAIL: testdata/env_var_with_go.txt:16: no match for `^GOPROXY=$` found in stdout
            
FAIL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant