16053: Add debian:10 install-and-boot test.
[arvados.git] / lib / install / deps_test.go
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 // Skip this slow test unless invoked as "go test -tags docker":
6 // +build docker
7
8 package install
9
10 import (
11         "os"
12         "testing"
13
14         "gopkg.in/check.v1"
15 )
16
17 func Test(t *testing.T) {
18         check.TestingT(t)
19 }
20
21 var _ = check.Suite(&Suite{})
22
23 type Suite struct{}
24
25 func (*Suite) TestInstallDeps(c *check.C) {
26         tmp := c.MkDir()
27         script := `
28 set -x
29 export GOPATH=${GOPATH:-${HOME}/go}
30 tmp="` + tmp + `"
31 sourcepath="$(realpath ../..)"
32 (cd ${sourcepath} && go build -o ${tmp} ./cmd/arvados-server)
33 docker run -i --rm --workdir /arvados \
34        -v ${tmp}/arvados-server:/arvados-server:ro \
35        -v ${sourcepath}:/arvados:ro \
36        -v /arvados/services/api/.bundle \
37        -v /arvados/apps/workbench/.bundle \
38        --env http_proxy \
39        --env https_proxy \
40        debian:10 \
41        bash -c "/arvados-server install -type test && /arvados-server boot -type test -config doc/examples/config/zzzzz.yml -own-temporary-database -shutdown -timeout 9m"
42 `
43         c.Check(runBash(script, os.Stdout, os.Stderr), check.IsNil)
44 }