1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: Apache-2.0
10 "git.arvados.org/arvados.git/sdk/go/arvados"
11 "git.arvados.org/arvados.git/sdk/go/arvadosclient"
12 "git.arvados.org/arvados.git/sdk/go/arvadostest"
16 // Gocheck boilerplate
17 var _ = Suite(&suite{})
21 func (s *suite) SetUpSuite(c *C) {
22 arvadostest.StartAPI()
25 func (s *suite) TearDownSuite(c *C) {
29 func (s *suite) TestTrackContainer(c *C) {
30 arv, err := arvadosclient.MakeArvadosClient()
31 c.Assert(err, Equals, nil)
32 arv.ApiToken = arvadostest.Dispatch1Token
34 done := make(chan bool, 1)
35 time.AfterFunc(10*time.Second, func() { done <- false })
38 RunContainer: func(dsp *Dispatcher, ctr arvados.Container, status <-chan arvados.Container) error {
39 for ctr := range status {
46 d.TrackContainer(arvadostest.QueuedContainerUUID)
47 c.Assert(<-done, Equals, true)