Give each node a declaration-files bucket of its own, so a grant names it and never needs a wildcard (issue 1694, ADR 0488) #64
@@ -137,13 +137,15 @@ func TestTheSharedNames(t *testing.T) {
|
||||
|
||||
// 1694/AC6: each node has a bucket of its own, so a grant names it and never needs a `*` (ADR 0486 §2).
|
||||
func TestEachNodeHasABucketOfItsOwn(t *testing.T) {
|
||||
b, err := FileBucketFor("g14")
|
||||
if err != nil || b != "declaration-files-g14" {
|
||||
t.Fatalf("%q %v", b, err)
|
||||
}
|
||||
s, err := FileStreamFor("g14")
|
||||
if err != nil || s != "OBJ_declaration-files-g14" {
|
||||
t.Fatalf("%q %v", s, err)
|
||||
for _, n := range []string{"ace", "g14", "novox", "shanks"} {
|
||||
b, err := FileBucketFor(n)
|
||||
if err != nil || b != "declaration-files-"+n {
|
||||
t.Errorf("bucket for %q: %q %v", n, b, err)
|
||||
}
|
||||
s, err := FileStreamFor(n)
|
||||
if err != nil || s != "OBJ_declaration-files-"+n {
|
||||
t.Errorf("stream for %q: %q %v", n, s, err)
|
||||
}
|
||||
}
|
||||
for _, bad := range []string{"", "a.b", "a*", "*", ">", "a b", "a>", "a/b", "ä"} {
|
||||
if _, err := FileBucketFor(bad); err == nil {
|
||||
|
||||
Reference in New Issue
Block a user