mirror of
https://github.com/FairwindsOps/polaris.git
synced 2026-05-15 21:57:40 +00:00
copy config.yaml to docker image enable external usage of dashboard package gofmt fix comment use packr for assets add gobuffalo/packr dependency add dependencies fix pointer issues add output-file option
35 lines
785 B
Go
35 lines
785 B
Go
// Copyright 2018 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package goproxytest_test
|
|
|
|
import (
|
|
"path/filepath"
|
|
"testing"
|
|
|
|
"github.com/rogpeppe/go-internal/goproxytest"
|
|
"github.com/rogpeppe/go-internal/gotooltest"
|
|
"github.com/rogpeppe/go-internal/testscript"
|
|
)
|
|
|
|
func TestScripts(t *testing.T) {
|
|
srv, err := goproxytest.NewServer(filepath.Join("testdata", "mod"), "")
|
|
if err != nil {
|
|
t.Fatalf("cannot start proxy: %v", err)
|
|
}
|
|
p := testscript.Params{
|
|
Dir: "testdata",
|
|
Setup: func(e *testscript.Env) error {
|
|
e.Vars = append(e.Vars,
|
|
"GOPROXY="+srv.URL,
|
|
)
|
|
return nil
|
|
},
|
|
}
|
|
if err := gotooltest.Setup(&p); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
testscript.Run(t, p)
|
|
}
|