Merge branch '21356-clean-imports'
[arvados.git] / sdk / go / arvados / integration_test_cluster.go
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: Apache-2.0
4
5 package arvados
6
7 import (
8         "os"
9         "path/filepath"
10 )
11
12 // IntegrationTestCluster returns the cluster that has been set up by
13 // the integration test framework (see /build/run-tests.sh). It panics
14 // on error.
15 func IntegrationTestCluster() *Cluster {
16         config, err := GetConfig(filepath.Join(os.Getenv("WORKSPACE"), "tmp", "arvados.yml"))
17         if err != nil {
18                 panic(err)
19         }
20         cluster, err := config.GetCluster("")
21         if err != nil {
22                 panic(err)
23         }
24         return cluster
25 }