mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-20 03:11:46 +00:00
40f8c4da94
- Rename 36 phaseN_X / phaseIAM_N funcs to runX. - Drop numeric suffix from 7 TestIAMN_X wrappers (TestIAM1_UserCRUD -> TestIAMUserCRUD). - Rewrite harness.Phase log strings "Phase N - X" -> "Single - X" to mirror multinode convention. - Add t.Parallel() to bucket #1: 10 read-only / own-everything top-level Tests (Environment, ClusterStatsCLI, Discovery, SerialConsoleAccess, KeyPairs, Image, TagManagement, AccountScoping, VPCSubnetE2E, RouteTableValidation). Sequential bucket retains source-order singleton lifecycle (InstanceLaunch through FinalClusterStats).
33 lines
1.1 KiB
Go
33 lines
1.1 KiB
Go
//go:build e2e
|
|
|
|
package single
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
|
|
"github.com/mulgadc/spinifex/tests/e2e/harness"
|
|
)
|
|
|
|
// runFinalClusterStats is a single-node sanity pass against `spx get
|
|
// vms`. Replaces the umbrella's phase9 + phase9a (deleted) — resource
|
|
// cleanup is now owned by harness.Fixture.Close, invoked from TestMain
|
|
// after every Test* in the package has run.
|
|
func runFinalClusterStats(t *testing.T, fix *Fixture) {
|
|
harness.Phase(t, "Single — Final Cluster Stats")
|
|
if fix.Env.Mode != harness.ModeSingle {
|
|
t.Skipf("Phase 9b is single-node only (mode=%s)", fix.Env.Mode)
|
|
}
|
|
|
|
out := harness.SpxGetVMs(t)
|
|
harness.Detail(t, "spx_get_vms_bytes", len(out))
|
|
|
|
// Best-effort sanity: log (don't fail) if the output unexpectedly lists
|
|
// any i-XXXXXX rows. Per-test fixture cleanups should have terminated
|
|
// every instance the suite launched in single-node mode, but other
|
|
// suites running in parallel would surface here.
|
|
if strings.Contains(out, "i-") {
|
|
t.Logf("phase9b: spx get vms still references instance-like rows (may be from concurrent suites):\n%s", out)
|
|
}
|
|
}
|