15003: Split out deprecated config stuff.
[arvados.git] / lib / config / deprecated_test.go
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 package config
6
7 import (
8         "os"
9
10         check "gopkg.in/check.v1"
11 )
12
13 func (s *LoadSuite) TestDeprecatedNodeProfilesToServices(c *check.C) {
14         hostname, err := os.Hostname()
15         c.Assert(err, check.IsNil)
16         s.checkEquivalent(c, `
17 Clusters:
18  z1111:
19   NodeProfiles:
20    "*":
21     arvados-dispatch-cloud:
22      listen: ":9006"
23     arvados-controller:
24      listen: ":9004"
25    `+hostname+`:
26     arvados-api-server:
27      listen: ":8000"
28 `, `
29 Clusters:
30  z1111:
31   Services:
32    RailsAPI:
33     InternalURLs:
34      "http://`+hostname+`:8000": {}
35    Controller:
36     InternalURLs:
37      "http://`+hostname+`:9004": {}
38    DispatchCloud:
39     InternalURLs:
40      "http://`+hostname+`:9006": {}
41   NodeProfiles:
42    "*":
43     arvados-dispatch-cloud:
44      listen: ":9006"
45     arvados-controller:
46      listen: ":9004"
47    `+hostname+`:
48     arvados-api-server:
49      listen: ":8000"
50 `)
51 }