diff options
Diffstat (limited to 'weed/filer/filer_conf_test.go')
| -rw-r--r-- | weed/filer/filer_conf_test.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/weed/filer/filer_conf_test.go b/weed/filer/filer_conf_test.go index ff868a3ec..1576c7d82 100644 --- a/weed/filer/filer_conf_test.go +++ b/weed/filer/filer_conf_test.go @@ -24,6 +24,18 @@ func TestFilerConf(t *testing.T) { LocationPrefix: "/buckets/", Replication: "001", }, + { + LocationPrefix: "/buckets", + ReadOnly: false, + }, + { + LocationPrefix: "/buckets/xxx", + ReadOnly: true, + }, + { + LocationPrefix: "/buckets/xxx/yyy", + ReadOnly: false, + }, }} fc.doLoadConf(conf) @@ -31,4 +43,7 @@ func TestFilerConf(t *testing.T) { assert.Equal(t, "abcd", fc.MatchStorageRule("/buckets/abcd/jasdf").Collection) assert.Equal(t, "001", fc.MatchStorageRule("/buckets/abc/jasdf").Replication) + assert.Equal(t, true, fc.MatchStorageRule("/buckets/xxx/yyy/zzz").ReadOnly) + assert.Equal(t, false, fc.MatchStorageRule("/buckets/other").ReadOnly) + } |
