mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 10:37:23 +01:00
G15e: register dynamic cleanup TestOps scenario
This commit is contained in:
1 parent
0ca00ebdd2
commit
d5275a765a
2 files changed
+101
No files matched your search
@@ -136,6 +136,42 @@ func TestG15dK8sDynamicRegistrationBuildsShellDriver(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestG15eK8sDynamicCleanupRegistrationBuildsShellDriver(t *testing.T) {
|
||||
repoRoot := findRepoRoot(t)
|
||||
raw, err := os.Open(filepath.Join(repoRoot, "testops", "registry", "g15e-k8s-dynamic-cleanup.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 != "g15e-k8s-dynamic-cleanup" || registration.Driver.Type != "shell" {
|
||||
t.Fatalf("registration=%+v", registration)
|
||||
}
|
||||
if registration.KnownGreenCommit != "ddec28c" {
|
||||
t.Fatalf("known_green_commit=%q want ddec28c", 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-g15d-k8s-dynamic.sh" {
|
||||
t.Fatalf("shell path=%q", shell.Path)
|
||||
}
|
||||
for _, want := range []string{"delete-pvc.log", "delete-generated-blockvolume.log", "iscsi-sessions.after-delete.txt"} {
|
||||
if !containsString(registration.Artifacts, want) {
|
||||
t.Fatalf("registration artifacts missing %q: %v", want, registration.Artifacts)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func containsString(values []string, want string) bool {
|
||||
for _, value := range values {
|
||||
if value == want {
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"schema_version": "1.0",
|
||||
"scenario": "g15e-k8s-dynamic-cleanup",
|
||||
"gate": "G15e",
|
||||
"layer": "L5-k8s",
|
||||
"driver": {
|
||||
"type": "shell",
|
||||
"path": "scripts/run-g15d-k8s-dynamic.sh"
|
||||
},
|
||||
"default_timeout_s": 900,
|
||||
"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-g15e-qa-test-instruction.md",
|
||||
"known_green_commit": "ddec28c",
|
||||
"artifacts": [
|
||||
"run.log",
|
||||
"kubectl-version.txt",
|
||||
"nodes.before.txt",
|
||||
"block-stack.rendered.yaml",
|
||||
"apply-block-stack.log",
|
||||
"apply-rbac.log",
|
||||
"apply-csidriver.log",
|
||||
"apply-csi-controller.log",
|
||||
"apply-csi-node.log",
|
||||
"apply-dynamic.log",
|
||||
"generated-blockvolume.yaml",
|
||||
"generated-blockvolume.err",
|
||||
"apply-generated-blockvolume.log",
|
||||
"pod.log",
|
||||
"pod.describe.txt",
|
||||
"blockmaster.log",
|
||||
"blockcsi-controller.log",
|
||||
"csi-provisioner.log",
|
||||
"csi-attacher.log",
|
||||
"blockvolume-generated.log",
|
||||
"delete-pod.log",
|
||||
"delete-pvc.log",
|
||||
"delete-generated-blockvolume.log",
|
||||
"kube-system-pods-deploys.txt",
|
||||
"app-storage.txt",
|
||||
"kube-system-pods-deploys.after-delete.txt",
|
||||
"app-storage.after-delete.txt",
|
||||
"iscsi-sessions.after-delete.txt",
|
||||
"cleanup.log"
|
||||
],
|
||||
"non_claims": [
|
||||
"Single-node Kubernetes only.",
|
||||
"Harness applies and deletes generated blockvolume manifests; no operator reconciliation claim.",
|
||||
"Cleanup verifies dynamic PVC, generated Deployment, and iSCSI session absence; it does not prove backend data shredding.",
|
||||
"Loopback iSCSI target exposure only.",
|
||||
"No failover while pod remains mounted.",
|
||||
"No CSI snapshot, clone, resize, block-mode, topology spread, or NVMe.",
|
||||
"No performance or soak claim."
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user