18 lines
494 B
Go
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)
|
|
}
|
|
}
|
|
}
|