1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
12 check "gopkg.in/check.v1"
15 var _ = check.Suite(&CommandSuite{})
17 type CommandSuite struct{}
19 func (*CommandSuite) TestLegacyConfigPath(c *check.C) {
20 var stdin, stdout, stderr bytes.Buffer
21 tmp, err := ioutil.TempFile("", "")
22 c.Assert(err, check.IsNil)
23 defer os.Remove(tmp.Name())
24 tmp.Write([]byte("Listen: \"1.2.3.4.5:invalidport\"\n"))
26 exited := Command.RunCommand("keepstore", []string{"-config", tmp.Name()}, &stdin, &stdout, &stderr)
27 c.Check(exited, check.Equals, 1)
28 c.Check(stderr.String(), check.Matches, `(?ms).*unable to migrate Listen value.*`)