[ARVADOS] updated: 1.1.3-84-gb77a0df
Git user
git at public.curoverse.com
Wed Feb 21 15:46:45 EST 2018
Summary of changes:
services/keepstore/azure_blob_volume.go | 6 ++++++
services/keepstore/azure_blob_volume_test.go | 13 ++++++++++++
services/keepstore/mounts_test.go | 12 +++++------
services/keepstore/s3_volume.go | 6 ++++++
services/keepstore/s3_volume_test.go | 13 ++++++++++++
services/keepstore/volume.go | 31 +++++++++++++++++-----------
services/keepstore/volume_test.go | 4 ++++
services/keepstore/volume_unix.go | 6 ++++++
services/keepstore/volume_unix_test.go | 13 ++++++++++++
9 files changed, 86 insertions(+), 18 deletions(-)
via b77a0df5575eb4d75b21b5c400fc8570efc97cea (commit)
via cff9f271514a559f8d7d130dea7cdd5521a81973 (commit)
via c28d87a0916349bfcaacc774aa1c05582e1f0154 (commit)
from 00693ff029257e72565148e8748941ac20cc99d1 (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 b77a0df5575eb4d75b21b5c400fc8570efc97cea
Merge: 00693ff cff9f27
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date: Wed Feb 21 15:46:32 2018 -0500
Merge branch '11645-keepstore-storageclasses' closes #11645
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>
commit cff9f271514a559f8d7d130dea7cdd5521a81973
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date: Wed Feb 21 15:42:48 2018 -0500
11645: Add tests that StorageClasses is loaded from config
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>
diff --git a/services/keepstore/azure_blob_volume_test.go b/services/keepstore/azure_blob_volume_test.go
index 5c6e2ab..60a7911 100644
--- a/services/keepstore/azure_blob_volume_test.go
+++ b/services/keepstore/azure_blob_volume_test.go
@@ -27,6 +27,7 @@ import (
"time"
"github.com/Azure/azure-sdk-for-go/storage"
+ "github.com/ghodss/yaml"
check "gopkg.in/check.v1"
)
@@ -707,6 +708,18 @@ func (s *StubbedAzureBlobSuite) TestStats(c *check.C) {
c.Check(stats(), check.Matches, `.*"InBytes":6,.*`)
}
+func (s *StubbedAzureBlobSuite) TestConfig(c *check.C) {
+ var cfg Config
+ err := yaml.Unmarshal([]byte(`
+Volumes:
+ - Type: Azure
+ StorageClasses: ["class_a", "class_b"]
+`), &cfg)
+
+ c.Check(err, check.IsNil)
+ c.Check(cfg.Volumes[0].GetStorageClasses(), check.DeepEquals, []string{"class_a", "class_b"})
+}
+
func (v *TestableAzureBlobVolume) PutRaw(locator string, data []byte) {
v.azHandler.PutRaw(v.ContainerName, locator, data)
}
diff --git a/services/keepstore/s3_volume_test.go b/services/keepstore/s3_volume_test.go
index acc1b11..4081e1e 100644
--- a/services/keepstore/s3_volume_test.go
+++ b/services/keepstore/s3_volume_test.go
@@ -19,6 +19,7 @@ import (
"git.curoverse.com/arvados.git/sdk/go/arvados"
"github.com/AdRoll/goamz/s3"
"github.com/AdRoll/goamz/s3/s3test"
+ "github.com/ghodss/yaml"
check "gopkg.in/check.v1"
)
@@ -435,6 +436,18 @@ func (s *StubbedS3Suite) newTestableVolume(c *check.C, raceWindow time.Duration,
return v
}
+func (s *StubbedS3Suite) TestConfig(c *check.C) {
+ var cfg Config
+ err := yaml.Unmarshal([]byte(`
+Volumes:
+ - Type: S3
+ StorageClasses: ["class_a", "class_b"]
+`), &cfg)
+
+ c.Check(err, check.IsNil)
+ c.Check(cfg.Volumes[0].GetStorageClasses(), check.DeepEquals, []string{"class_a", "class_b"})
+}
+
func (v *TestableS3Volume) Start() error {
tmp, err := ioutil.TempFile("", "keepstore")
v.c.Assert(err, check.IsNil)
diff --git a/services/keepstore/volume_unix_test.go b/services/keepstore/volume_unix_test.go
index ea3d91d..7f1cd21 100644
--- a/services/keepstore/volume_unix_test.go
+++ b/services/keepstore/volume_unix_test.go
@@ -19,6 +19,7 @@ import (
"testing"
"time"
+ "github.com/ghodss/yaml"
check "gopkg.in/check.v1"
)
@@ -427,3 +428,15 @@ func (s *UnixVolumeSuite) TestStats(c *check.C) {
c.Check(err, check.IsNil)
c.Check(stats(), check.Matches, `.*"FlockOps":2,.*`)
}
+
+func (s *UnixVolumeSuite) TestConfig(c *check.C) {
+ var cfg Config
+ err := yaml.Unmarshal([]byte(`
+Volumes:
+ - Type: Directory
+ StorageClasses: ["class_a", "class_b"]
+`), &cfg)
+
+ c.Check(err, check.IsNil)
+ c.Check(cfg.Volumes[0].GetStorageClasses(), check.DeepEquals, []string{"class_a", "class_b"})
+}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list