134c8b3c6b
Three root causes fixed:
1. DeviceCucumberIT — duplicate step class removed from bdd.device; moved
to dedicated devicebdd package with its own TestSetup and glue scanning,
preventing duplicate-step conflicts with IoT suites.
2. DeviceNavigationSteps — ?-in-Cucumber-expression treated as optional-char
quantifier. Changed GET /devices?capability=, ?deviceClass=, ?protocol=
patterns to anchored regex (^…$) with (.+) capture so literal ? matches.
3. IotProfileCucumberIT iotReady=true — CanonicalQueryFilter was silently
redirecting ?iotReady=true to the canonical URL (which omitted iotReady).
RestAssured followed the 302 and the server never saw the parameter.
Fix: add iotReady to QueryNormalisationService.canonicalForReplacements
with normaliseIotReady ("true" → "true", else absent).
ServiceResource now reads iotReady via UriInfo (bypasses JAX-RS @QueryParam
which is downstream of the filter rewrite). RegistryService uses primitive
boolean + INNER JOIN iot_profiles when iotReady=true.
Co-Authored-By: Mira Rehfeld <noreply@anthropic.com>
33 lines
1.4 KiB
Gherkin
33 lines
1.4 KiB
Gherkin
Feature: Sandbox registration
|
|
|
|
Scenario: Create a sandbox and receive an API key exactly once
|
|
When an agent registers a sandbox named "peter-demo" with email "peter@openclaw.io"
|
|
Then the response code is 201
|
|
And the response contains a sandbox id
|
|
And the response contains an API key with prefix "apix_sb_"
|
|
And the response contains tier "FREE"
|
|
And the response contains a non-null expiresAt
|
|
And the response contains _links.self
|
|
And the response contains _links.services
|
|
|
|
Scenario: Registration fails when name contains uppercase letters
|
|
When an agent registers a sandbox named "Peter-Demo" with email "peter@openclaw.io"
|
|
Then the response code is 400
|
|
|
|
Scenario: Registration fails when name is too short
|
|
When an agent registers a sandbox named "ab" with email "peter@openclaw.io"
|
|
Then the response code is 400
|
|
|
|
Scenario: Registration fails when name starts with a hyphen
|
|
When an agent registers a sandbox named "-demo" with email "peter@openclaw.io"
|
|
Then the response code is 400
|
|
|
|
Scenario: Registration fails when email is invalid
|
|
When an agent registers a sandbox named "valid-name" with email "not-an-email"
|
|
Then the response code is 400
|
|
|
|
Scenario: Duplicate name is allowed since names are display-only labels
|
|
Given a sandbox named "duplicate-test" exists
|
|
When an agent registers a sandbox named "duplicate-test" with email "other@example.com"
|
|
Then the response code is 201
|