mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-24 04:33:17 +00:00
fix(provider-msp): qualify installer purchase guidance
Keep first-run evaluation and summary guidance conditional on actual Plan availability and confirmed active limits. Remove the ordinary manual-key purchase prompt while retaining the separate custom-license binding path, and update the installability contract and focused assertions in the same commit. Change-source: pulse-maintainer
This commit is contained in:
@@ -403,11 +403,12 @@ func TestProviderMSPSetupScriptSupportsUnlicensedEvaluation(t *testing.T) {
|
||||
"PULSE_PROVIDER_MSP_EVAL_EMAIL",
|
||||
"PULSE_PROVIDER_MSP_SIGNUP_SOURCE",
|
||||
`setup_stage: "images_ready"`,
|
||||
"buy a plan from Plan in your provider portal",
|
||||
"Plan in your provider portal shows whether a paid upgrade is available",
|
||||
"keep within two clients until Plan confirms a higher active limit",
|
||||
)
|
||||
// Buying happens in the portal. The old hint sent providers to a request
|
||||
// form that waited on a human reply with a checkout link.
|
||||
assertNotContainsAny(t, script, "request an upgrade", "eval_license_id=")
|
||||
// A purchase route is shown only when available; setup must not claim that
|
||||
// checkout is live or that the paid limit is already active.
|
||||
assertNotContainsAny(t, script, "request an upgrade", "eval_license_id=", "to buy, request a licence bound", "checkout is by Stripe and the new limit applies within")
|
||||
if strings.LastIndex(script, "pull_provider_images\n") > strings.LastIndex(script, "ensure_eval_license\n") {
|
||||
t.Fatal("evaluation must be issued only after pinned provider images are reachable")
|
||||
}
|
||||
@@ -620,13 +621,12 @@ func TestProviderMSPSetupLeavesPlatformRunning(t *testing.T) {
|
||||
)
|
||||
assertNotContainsAny(t, script, "Pulse Provider MSP setup prepared.")
|
||||
|
||||
// The closing summary says where buying happens and no longer asks the
|
||||
// provider to carry a lease signing key to anyone: the portal purchase
|
||||
// binds it without a copy step.
|
||||
// The closing summary points at Plan without claiming checkout is live,
|
||||
// and no longer asks the provider to carry a lease signing key to anyone.
|
||||
summary := script[strings.Index(script, "Pulse Provider MSP is running."):]
|
||||
summary = summary[:strings.Index(summary, "EOF")]
|
||||
assertContainsAll(t, summary, "open Plan in\nthe portal", "Manage billing")
|
||||
assertNotContainsAny(t, summary, "must bind this key", "derive_lease_signing_public_key")
|
||||
assertContainsAll(t, summary, "Open Plan in the portal to see whether", "Keep within two clients until Plan confirms a", "Manage billing")
|
||||
assertNotContainsAny(t, summary, "must bind this key", "derive_lease_signing_public_key", "checkout is by Stripe", "applies within\nseconds")
|
||||
|
||||
sequence := " ensure_eval_license\n validate_compose_config\n start_provider_services\n run_install_proof_if_requested\n print_summary\n"
|
||||
if !strings.Contains(script, sequence) {
|
||||
|
||||
Reference in New Issue
Block a user