Files
mesh-host/internal/link/files_node_test.go
T
2026-10-21 15:41:09 +02:00

18 lines
494 B
Go

package link
import (
"context"
"strings"
"testing"
)
// 1695/AC10: a link with no node name, or a name that is not a bucket token, reads nothing: it cannot name its own bucket.
func TestAFileIsReadOnlyFromTheBucketOfTheNodesOwnName(t *testing.T) {
for _, node := range []string{"", "a.b", "a*", "a>", "a b"} {
_, err := OverNATS{Node: node}.FileObject(context.Background(), strings.Repeat("0", 64), 10)
if err == nil {
t.Errorf("1695/AC10: node %q read an object", node)
}
}
}