[ARVADOS] updated: 1.1.4-490-g294220036

Git user git at public.curoverse.com
Wed Jun 20 17:15:29 EDT 2018


Summary of changes:
 sdk/go/arvados/config_test.go | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 sdk/go/arvados/config_test.go

       via  2942200364b23703fe610d1a44a49848e96d050d (commit)
      from  43fce79bb4793c2d184d6ff8f9a6cc86d7e3e8b9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 2942200364b23703fe610d1a44a49848e96d050d
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Wed Jun 20 17:14:43 2018 -0400

    13611: Test reading InstanceTypes config as array and hash.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>

diff --git a/sdk/go/arvados/config_test.go b/sdk/go/arvados/config_test.go
new file mode 100644
index 000000000..6846025ed
--- /dev/null
+++ b/sdk/go/arvados/config_test.go
@@ -0,0 +1,30 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: Apache-2.0
+
+package arvados
+
+import (
+	"github.com/ghodss/yaml"
+	check "gopkg.in/check.v1"
+)
+
+var _ = check.Suite(&ConfigSuite{})
+
+type ConfigSuite struct {
+}
+
+func (s *ConfigSuite) TestInstanceTypesAsArray(c *check.C) {
+	var cluster Cluster
+	yaml.Unmarshal([]byte("InstanceTypes:\n- Name: foo\n"), &cluster)
+	c.Check(len(cluster.InstanceTypes), check.Equals, 1)
+	c.Check(cluster.InstanceTypes["foo"].Name, check.Equals, "foo")
+}
+
+func (s *ConfigSuite) TestInstanceTypesAsHash(c *check.C) {
+	var cluster Cluster
+	yaml.Unmarshal([]byte("InstanceTypes:\n  foo:\n    ProviderType: bar\n"), &cluster)
+	c.Check(len(cluster.InstanceTypes), check.Equals, 1)
+	c.Check(cluster.InstanceTypes["foo"].Name, check.Equals, "foo")
+	c.Check(cluster.InstanceTypes["foo"].ProviderType, check.Equals, "bar")
+}

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list