mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 19:17:28 +01:00
TestOps: register G15b K8s static PV scenario
This commit is contained in:
1 parent
d518463893
commit
aaad2e5c91
2 files changed
+86
No files matched your search
@@ -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)
|
||||
|
||||
@@ -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."
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user