diff --git a/seaweed-block/internal/testops/registration_test.go b/seaweed-block/internal/testops/registration_test.go index ec5aedd099..102dc90d14 100644 --- a/seaweed-block/internal/testops/registration_test.go +++ b/seaweed-block/internal/testops/registration_test.go @@ -63,6 +63,40 @@ func TestG15bManifestRegistrationRunsGoTestAndWritesArtifacts(t *testing.T) { } } +func TestG15bK8sStaticRegistrationBuildsShellDriver(t *testing.T) { + repoRoot := findRepoRoot(t) + raw, err := os.Open(filepath.Join(repoRoot, "testops", "registry", "g15b-k8s-static.json")) + if err != nil { + t.Fatalf("open registration: %v", err) + } + defer raw.Close() + + registration, err := DecodeRegistration(raw) + if err != nil { + t.Fatalf("DecodeRegistration: %v", err) + } + if registration.Scenario != "g15b-k8s-static" || registration.Driver.Type != "shell" { + t.Fatalf("registration=%+v", registration) + } + if registration.KnownGreenCommit != "95b7217" { + t.Fatalf("known_green_commit=%q want 95b7217", registration.KnownGreenCommit) + } + driver, err := registration.NewDriver(repoRoot) + if err != nil { + t.Fatalf("NewDriver: %v", err) + } + shell, ok := driver.(ShellDriver) + if !ok { + t.Fatalf("driver type=%T want ShellDriver", driver) + } + if !filepath.IsAbs(shell.Path) || filepath.Base(shell.Path) != "run-g15b-k8s-static.sh" { + t.Fatalf("shell path=%q", shell.Path) + } + if _, err := os.Stat(shell.Path); err != nil { + t.Fatalf("shell driver path missing: %v", err) + } +} + func findRepoRoot(t *testing.T) string { t.Helper() _, file, _, ok := runtime.Caller(0) diff --git a/seaweed-block/testops/registry/g15b-k8s-static.json b/seaweed-block/testops/registry/g15b-k8s-static.json new file mode 100644 index 0000000000..c86e2e6eab --- /dev/null +++ b/seaweed-block/testops/registry/g15b-k8s-static.json @@ -0,0 +1,52 @@ +{ + "schema_version": "1.0", + "scenario": "g15b-k8s-static", + "gate": "G15b", + "layer": "L5-k8s", + "driver": { + "type": "shell", + "path": "scripts/run-g15b-k8s-static.sh" + }, + "default_timeout_s": 600, + "required_capabilities": [ + "bash", + "kubectl", + "privileged-k8s-node", + "iscsiadm", + "iscsi_tcp-loadable", + "mount" + ], + "required_images": [ + "sw-block:local", + "sw-block-csi:local" + ], + "qa_instruction": "sw-block/design/test/v3-phase-15-g15b-k8s-qa-test-instruction.md", + "known_green_commit": "95b7217", + "artifacts": [ + "run.log", + "kubectl-version.txt", + "nodes.before.txt", + "apply-block-stack.log", + "apply-csidriver.log", + "apply-csi-controller.log", + "apply-csi-node.log", + "apply-static.log", + "pod.log", + "pod.describe.txt", + "blockmaster.log", + "blockvolume-r1.log", + "blockvolume-r2.log", + "blockcsi-controller.log", + "kube-system-pods.txt", + "app-pv-pvc-pod.txt", + "cleanup.log" + ], + "non_claims": [ + "Single-node Kubernetes only.", + "Static PV/PVC only; no dynamic provisioning.", + "Loopback iSCSI target exposure only.", + "No failover while pod remains mounted.", + "No CSI snapshot, clone, resize, or NVMe.", + "No performance or soak claim." + ] +}