projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix more golint warnings.
[arvados.git]
/
lib
/
config
/
load_test.go
diff --git
a/lib/config/load_test.go
b/lib/config/load_test.go
index 17e0af7ba0bcf9526458641b9f89e8f92aae5a4e..58ddf950efdd82d1f1a2f26b4d3b4a248f116764 100644
(file)
--- a/
lib/config/load_test.go
+++ b/
lib/config/load_test.go
@@
-15,8
+15,8
@@
import (
"strings"
"testing"
"strings"
"testing"
- "git.
curoverse.com
/arvados.git/sdk/go/arvados"
- "git.
curoverse.com
/arvados.git/sdk/go/ctxlog"
+ "git.
arvados.org
/arvados.git/sdk/go/arvados"
+ "git.
arvados.org
/arvados.git/sdk/go/ctxlog"
"github.com/ghodss/yaml"
"github.com/sirupsen/logrus"
check "gopkg.in/check.v1"
"github.com/ghodss/yaml"
"github.com/sirupsen/logrus"
check "gopkg.in/check.v1"
@@
-46,6
+46,12
@@
func testLoader(c *check.C, configdata string, logdst io.Writer) *Loader {
type LoadSuite struct{}
type LoadSuite struct{}
+func (s *LoadSuite) SetUpSuite(c *check.C) {
+ os.Unsetenv("ARVADOS_API_HOST")
+ os.Unsetenv("ARVADOS_API_HOST_INSECURE")
+ os.Unsetenv("ARVADOS_API_TOKEN")
+}
+
func (s *LoadSuite) TestEmpty(c *check.C) {
cfg, err := testLoader(c, "", nil).Load()
c.Check(cfg, check.IsNil)
func (s *LoadSuite) TestEmpty(c *check.C) {
cfg, err := testLoader(c, "", nil).Load()
c.Check(cfg, check.IsNil)
@@
-158,6
+164,7
@@
func (s *LoadSuite) TestSampleKeys(c *check.C) {
cfg, err := testLoader(c, yaml, nil).Load()
c.Assert(err, check.IsNil)
cc, err := cfg.GetCluster("z1111")
cfg, err := testLoader(c, yaml, nil).Load()
c.Assert(err, check.IsNil)
cc, err := cfg.GetCluster("z1111")
+ c.Assert(err, check.IsNil)
_, hasSample := cc.InstanceTypes["SAMPLE"]
c.Check(hasSample, check.Equals, false)
if strings.Contains(yaml, "Foo") {
_, hasSample := cc.InstanceTypes["SAMPLE"]
c.Check(hasSample, check.Equals, false)
if strings.Contains(yaml, "Foo") {