Files
seaweedfs/seaweed-block/cmd/blockmaster/chart_state_regression_test.go
T
pingqiuandClaude Opus 5.5 951fa7985e test: the four reproductions skip unless SEAWEED_KNOWN_BUGS=1 (#186 #187 #188 #189)
Each names its open issue; the fix PR removes its skip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 18:11:08 -08:00

36 lines
1.1 KiB
Go

package main
import (
"gopkg.in/yaml.v3"
"os"
"path/filepath"
"strings"
"testing"
)
func TestChartDefaultAuthorityStateSurvivesPodReplacement(t *testing.T) {
if os.Getenv("SEAWEED_KNOWN_BUGS") != "1" {
t.Skip("known bug #187 (open): reproduction runs with SEAWEED_KNOWN_BUGS=1; the fix PR removes this skip")
}
var values struct {
Blockmaster struct {
StateHostPath string `yaml:"stateHostPath"`
AuthorityStore string `yaml:"authorityStore"`
} `yaml:"blockmaster"`
}
raw, err := os.ReadFile(filepath.Join("..", "..", "charts", "seaweed-block", "values.yaml"))
if err != nil {
t.Fatal(err)
}
if err := yaml.Unmarshal(raw, &values); err != nil {
t.Fatal(err)
}
template, err := os.ReadFile(filepath.Join("..", "..", "charts", "seaweed-block", "templates", "blockmaster.yaml"))
if err != nil {
t.Fatal(err)
}
if values.Blockmaster.StateHostPath == "" && strings.Contains(string(template), "emptyDir: {}") {
t.Fatalf("default authorityStore=%s uses the chart's emptyDir state branch; a replacement Pod receives an empty store (same-Pod container restart is unaffected)", values.Blockmaster.AuthorityStore)
}
}