X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/87275ec769831e04982a714049ee9d67b6342d68..50e758a596802a957b889814904eda9b7e7a5267:/services/keepstore/volume_unix_test.go diff --git a/services/keepstore/volume_unix_test.go b/services/keepstore/volume_unix_test.go index 0edf9b8538..7f1cd21964 100644 --- a/services/keepstore/volume_unix_test.go +++ b/services/keepstore/volume_unix_test.go @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + package main import ( @@ -15,6 +19,7 @@ import ( "testing" "time" + "github.com/ghodss/yaml" check "gopkg.in/check.v1" ) @@ -423,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"}) +}