16981: Removes config loader code to fix import cycle.
[arvados.git] / tools / sync-groups / federation_test.go
index 2462383f3e4ddc727c1336c156eacb18590417c5..baa2ec02a3540711777d793ca03877e481db51ab 100644 (file)
@@ -5,12 +5,15 @@
 package main
 
 import (
+       "bytes"
        "net"
        "os"
        "path/filepath"
 
+       "git.arvados.org/arvados.git/lib/config"
        "git.arvados.org/arvados.git/sdk/go/arvados"
        "git.arvados.org/arvados.git/sdk/go/arvadostest"
+       "git.arvados.org/arvados.git/sdk/go/ctxlog"
        check "gopkg.in/check.v1"
 )
 
@@ -101,10 +104,15 @@ func (s *FederationSuite) SetUpSuite(c *check.C) {
 `
                }
 
-               tc, err := arvadostest.NewTestCluster(
-                       filepath.Join(cwd, "..", ".."),
-                       id, yaml, "127.0.0."+id[3:], c.Log)
+               loader := config.NewLoader(bytes.NewBufferString(yaml), ctxlog.TestLogger(c))
+               loader.Path = "-"
+               loader.SkipLegacy = true
+               loader.SkipAPICalls = true
+               cfg, err := loader.Load()
                c.Assert(err, check.IsNil)
+               tc := arvadostest.NewTestCluster(
+                       filepath.Join(cwd, "..", ".."),
+                       id, cfg, "127.0.0."+id[3:], c.Log)
                s.testClusters[id] = tc
                s.testClusters[id].Start()
        }