Add Emberwake Cloud Ecosystem deploy hub with AWS and generic spread templates.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Unified expandable panels with mermaid flows, ZIP export, connection tests, and Playwright smoke coverage.
This commit is contained in:
33
server/internal/erasure/s3_crr_test.go
Normal file
33
server/internal/erasure/s3_crr_test.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package erasure
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestS3ShardKeyRegional(t *testing.T) {
|
||||
if got := S3ShardKey("tok", "eu-west-1", 2, "abc"); got != "shards/tok/eu-west-1/2-abc.bin" {
|
||||
t.Fatalf("key=%q", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestFormatParseShardAdvert(t *testing.T) {
|
||||
a := FormatShardAdvert("us-east-1", 3)
|
||||
r, i, ok := ParseShardAdvert(a)
|
||||
if !ok || r != "us-east-1" || i != 3 {
|
||||
t.Fatalf("r=%q i=%d", r, i)
|
||||
}
|
||||
}
|
||||
|
||||
func TestBuildS3CRRRule(t *testing.T) {
|
||||
doc, err := BuildS3CRRRule(S3ShardConfig{
|
||||
ShardBucket: "p", ShardRegion: "us-east-1", CRRDestBucket: "r", CRRDestRegion: "eu-west-1",
|
||||
ReplicationAccountID: "111",
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if role, _ := doc["Role"].(string); !strings.Contains(role, "111") {
|
||||
t.Fatalf("role=%q", role)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user