X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/59e8b47bee1c9699cbb2d16369481bd688da6e3d..adbbe252483b5442707c1e2e03f5347f913e1125:/tools/sync-groups/federation_test.go diff --git a/tools/sync-groups/federation_test.go b/tools/sync-groups/federation_test.go index 2462383f3e..d5fed3e29f 100644 --- a/tools/sync-groups/federation_test.go +++ b/tools/sync-groups/federation_test.go @@ -5,12 +5,16 @@ package main import ( + "bytes" "net" "os" "path/filepath" + "git.arvados.org/arvados.git/lib/boot" + "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" ) @@ -19,7 +23,7 @@ var _ = check.Suite(&FederationSuite{}) var origAPIHost, origAPIToken string type FederationSuite struct { - testClusters map[string]*arvadostest.TestCluster + testClusters map[string]*boot.TestCluster oidcprovider *arvadostest.OIDCProvider } @@ -36,7 +40,7 @@ func (s *FederationSuite) SetUpSuite(c *check.C) { s.oidcprovider.ValidClientID = "clientid" s.oidcprovider.ValidClientSecret = "clientsecret" - s.testClusters = map[string]*arvadostest.TestCluster{ + s.testClusters = map[string]*boot.TestCluster{ "z1111": nil, "z2222": nil, } @@ -101,12 +105,19 @@ 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 := boot.NewTestCluster( + filepath.Join(cwd, "..", ".."), + id, cfg, "127.0.0."+id[3:], c.Log) + tc.Super.NoWorkbench1 = true + tc.Super.NoWorkbench2 = true + tc.Start() s.testClusters[id] = tc - s.testClusters[id].Start() } for _, tc := range s.testClusters { ok := tc.WaitReady()