Skip to content

Fix phantom schemas, wrong error codes, and copy-paste bugs in feature files (#53) - #62

Merged
JoseMConde merged 8 commits into
camaraproject:mainfrom
DLondonoD:fix/issue-53
Jul 31, 2026
Merged

Fix phantom schemas, wrong error codes, and copy-paste bugs in feature files (#53)#62
JoseMConde merged 8 commits into
camaraproject:mainfrom
DLondonoD:fix/issue-53

Conversation

@DLondonoD

Copy link
Copy Markdown
Contributor

What type of PR is this?

tests

What this PR does / why we need it:

Fixes multiple test bugs in Test_definitions/*.feature files where Gherkin
steps reference schemas, parameters, operations, or error codes that don't
match the OpenAPI spec:

  1. Phantom schema referencescreateAppInstance.feature,
    createAppDeployment.feature, and updateAppDeployment.feature
    referenced nonexistent components (AppInstanceManifest,
    AppDeploymentManifest); the actual request bodies are anonymous inline
    object schemas. Replaced with generic "request body schema for this
    operation" phrasing.
  2. Query parameters mislabeled as path parametersappId,
    appInstanceId, region (getAppInstance.feature), appId,
    appDeploymentId (getAppDeployments.feature), and region, status
    (getEdgeCloudZones.feature) are all in: query in the spec but were
    described as "path parameter". Also fixed a copy-pasted region
    scenario that said "a valid application ID" instead of "a valid region".
  3. Non-existent operation namesremoveAppInstance/
    removeAppDeployment (don't exist) corrected to
    deleteAppInstance/deleteAppDeployment.
  4. Invalid 410 scenario removed from getAppInstance.feature
    GET /appinstances doesn't document 410 at all; the scenario was
    copied from the deployments feature file and never adapted (wrong
    entity id, nonexistent operation, leftover comment from the other file).
  5. Invalid query filtergetAppDeployments.feature filtered by
    appInstanceId, which isn't a valid query parameter for
    GET /deployments (only appId/appDeploymentId are); replaced with
    a proper appDeploymentId filter scenario, and fixed several
    createAppInstance-labeled steps that should have said
    createAppDeployment.
  6. Deprecated/wrong error codesCONFLICT (deprecated per the
    Design Guide) asserted in submitApp, createAppInstance, and
    createAppDeployment's 409 scenarios; corrected to ALREADY_EXISTS,
    matching the spec's own examples. deleteApp.feature corrected to
    ABORTED, also matching its spec example.
  7. Miscellaneous typos: appPorviderappProvider,
    componentSpectcomponentSpec, non-standard step phrasing in
    submitApp.feature; PascalCase KubernetesClusterRef corrected to the
    spec's actual kubernetesClusterRef/kubernetesClusterRefs; singular
    /deployment/{appDeploymentId} path corrected to plural
    /deployments/{appDeploymentId}; appDeploymentIdd typo; wrong
    AppInstanceInfo schema in updateAppDeployment.feature corrected to
    AppDeploymentInfo; list-response scenarios in getAppInstance.feature
    and getAppDeployments.feature corrected to assert against an array of
    the schema instead of a bare object.

Out of scope / left untouched: the wrong singular getEdgeCloudZone
operationId, the "When When the request..." typo, and the wrong
deleteApp/createApp operationIds referenced in
updateAppDeployment.feature, deleteAppDeployment.feature, and
createAppInstance.feature — these are already covered by issue #52's fix
in a separate branch/PR.

Which issue(s) this PR fixes:

Fixes #53

Special notes for reviewers:

This PR has two merge-order dependencies on other open PRs. Both were
verified with an actual local merge simulation (not just static analysis),
and real Git conflicts were confirmed in both cases:

1. PR #56 (fixes #48) removes 410 from getAppDeployments,
deleteAppDeployment, and updateAppDeployment (replacing it with 404
on the GET, and simply dropping it where 404 already existed on the
other two). This PR intentionally left the three corresponding
@eam_*_410.1_gone scenarios untouched, since as of this branch's base the
spec still documents 410 for those operations. Once #56 merges, those
three scenarios will test an error code that no longer exists there and
should be removed or converted to 404 as follow-up.

2. PR #58 (fixes #49) repurposes getAppInstance.feature from the
list operation (GET /appinstances) to a new by-id operation
(GET /app-instances/{appInstanceId}), moving the list scenarios into a
new getAppInstances.feature file, and removes getAppDeployments'
appDeploymentId query filter entirely (since it becomes redundant with
a new getAppDeployment by-id endpoint). This directly conflicts with
this PR's changes:
- getAppInstance.feature: this PR fixes it as the list operation
(query-param labels, array-schema assertion, removed invalid 410
scenario); after #58, that content semantically belongs in
getAppInstances.feature instead, and getAppInstance.feature will
mean something entirely different (by-id).
- getAppDeployments.feature: this PR adds a "filtered by
appDeploymentId" scenario (replacing the invalid appInstanceId
one); #58 removes that same filter as redundant with its new
by-id endpoint — the two changes are directly opposed.

Recommendation: merge #58 (and ideally #56) first, then rebase/redo
this PR's getAppInstance.feature and getAppDeployments.feature fixes
against the post-#58 file layout (i.e., apply the equivalent fixes to
getAppInstances.feature instead of getAppInstance.feature, and drop the
now-redundant appDeploymentId filter addition). The other 7 files touched
by this PR (submitApp, deleteApp, createAppInstance,
createAppDeployment, deleteAppDeployment, updateAppDeployment,
getEdgeCloudZones) are unaffected by either #56 or #58 and can land
independently.

Changelog input

release-note

Additional documentation

This section can be blank.

docs

…e files (camaraproject#53)

Point 1 - Phantom schema references: createAppInstance.feature,
createAppDeployment.feature, and updateAppDeployment.feature referenced
nonexistent components (AppInstanceManifest, AppDeploymentManifest).
The actual request bodies for these operations are anonymous inline
object schemas in the spec, not named components. Replaced with
"the request body schema for this operation" generic phrasing.

Point 2 - Query parameters mislabeled as path parameters: appId,
appInstanceId, region (getAppInstance.feature), appId, appDeploymentId
(getAppDeployments.feature), and region, status
(getEdgeCloudZones.feature) are all `in: query` in the spec but were
described as "path parameter". Also fixed getAppInstance.feature's
region scenario, which said "is set to a valid application ID"
(copy-pasted from the appId scenario) instead of "a valid region".

Point 3 - Non-existent operation names: getAppInstance.feature and
getAppDeployments.feature referenced "removeAppInstance" and
"removeAppDeployment", neither of which exist; corrected to
deleteAppInstance/deleteAppDeployment.

Point 4 - getAppInstance.feature's 410 scenario didn't apply to this
operation at all: GET /appinstances doesn't document 410 (only
/deployments and the two notification callbacks do), it referenced
appDeploymentId instead of appInstanceId, called the nonexistent
removeAppInstance operation, and had a leftover
"#/deployments GET 410" comment. Removed the scenario entirely -
clearly copied from the deployments feature file and never adapted.

Point 5 - getAppDeployments.feature filtered by appInstanceId, which
is not a valid query parameter for GET /deployments (only appId and
appDeploymentId are); replaced with a filter-by-appDeploymentId
scenario using the operation's actual query parameters, and fixed
several createAppInstance-labeled Given/response-property steps that
should have said createAppDeployment.

Point 6 - Deprecated/wrong error code CONFLICT (per the Design Guide,
CONFLICT is deprecated) asserted in submitApp.feature,
createAppInstance.feature, and createAppDeployment.feature's 409
scenarios: corrected to ALREADY_EXISTS, matching what the spec's own
409 example documents for each of these operations. deleteApp.feature
corrected to ABORTED, matching its spec example.

Point 7 - Miscellaneous typos:
7a. submitApp.feature: "$.appPorvider" -> "$.appProvider",
    "$.componentSpect" -> "$.componentSpec"; non-standard
    "When invoking with the POST method..." step replaced with the
    standard 'When the request "submitApp" is sent' phrasing used
    everywhere else.
7b. createAppInstance.feature / createAppDeployment.feature:
    PascalCase "$.KubernetesClusterRef" corrected to the spec's actual
    lowerCamelCase property names: kubernetesClusterRef (singular,
    instances) / kubernetesClusterRefs (plural, deployments).
7c. updateAppDeployment.feature / deleteAppDeployment.feature:
    singular "/deployment/{appDeploymentId}" resource path corrected
    to plural "/deployments/{appDeploymentId}"; "$.appDeploymentIdd"
    typo (extra "d") fixed in both files.
7d. updateAppDeployment.feature: success scenario checked the
    response against AppInstanceInfo; corrected to AppDeploymentInfo,
    matching the spec's actual 200 response schema for this operation.
7e. getAppInstance.feature (and, for consistency, also
    getAppDeployments.feature): list-all/filtered success scenarios
    checked the response against a bare AppInstanceInfo/
    AppDeploymentInfo object; GET /appinstances and GET /deployments
    actually return arrays of these schemas, so introduced
    "the response body is an array complying with the OAS schema
    at ..." phrasing for these array responses.

Out of scope (left untouched, already covered by issue camaraproject#52's fix in
a separate branch): the wrong singular "getEdgeCloudZone" operationId
and the "When When the request..." keyword typo in
getEdgeCloudZones.feature; the wrong "deleteApp"/"createApp"
operationIds referenced in updateAppDeployment.feature,
deleteAppDeployment.feature, and (partially, before I touched it for
unrelated fixes) createAppInstance.feature.

Fixes camaraproject#53
Adopt approved-but-unmerged fixes from fix/issue-52 (PR camaraproject#61 review
feedback) ahead of PR camaraproject#62 to avoid future conflicts.

Resolved 3 overlapping conflicts, keeping the correct value from
each side based on the OpenAPI spec:
- createAppInstance.feature: kept issue-53's lowerCamelCase
  '$.kubernetesClusterRef' (matches the spec property name) over
  issue-52's untouched PascalCase '$.KubernetesClusterRef'.
- deleteAppDeployment.feature: combined issue-53's fix of the
  '$.appDeploymentIdd' typo with issue-52's fix of the wrong
  'deleteApp' operationId -> 'deleteAppDeployment'.
- getEdgeCloudZones.feature: combined issue-53's query-parameter
  fix (region/status) with issue-52's fix of the duplicated
  'When When' keyword and the singular 'getEdgeCloudZone'
  operationId/tags, and kept the removal of the phantom 404
  scenario (not documented for this operation).
Adopts main's PR camaraproject#58 restructuring of getAppInstance/getAppDeployments
(list vs by-id split) ahead of PR camaraproject#62 to avoid conflicts.

Resolved 2 conflicts:
- getAppInstance.feature: took main's version entirely. PR camaraproject#58 split
  this into a by-id-only operation (new getAppInstances.feature now
  owns the list/filter scenarios), making fix/issue-53's list-oriented
  fixes to this file obsolete.
- getAppDeployments.feature: kept fix/issue-53's naming/wording fixes
  (createAppDeployment references, 'query parameter' phrasing, array
  schema check) but dropped the appDeploymentId-filter scenario and its
  404, since GET /deployments no longer accepts that query param per
  main (moved to the new by-id getAppDeployment.feature); renumbered
  the remaining 404 scenario back to 404.1.
getAppDeployments, deleteAppDeployment and updateAppDeployment no
longer document 410 in the spec since the fix in camaraproject#48/camaraproject#56 (410 is now
scoped to the notification/callback flow only). These 3 .feature
files still had leftover '410 GONE' scenarios asserting a response
code the operations never return.
Issue camaraproject#53 replaced the deprecated CONFLICT error code with ALREADY_EXISTS
(and ABORTED for deleteApp) in the response bodies, but the scenario tags
in 4 .feature files still referenced the old 'conflict' wording:
- createAppInstance.feature: @eam_createAppInstance_409.conflict ->
  @eam_createAppInstance_409.1_already_exists (also fixed missing '.1_'
  numbering, inconsistent with the rest of the suite)
- createAppDeployment.feature: @eam_createAppDeployment_409.conflict ->
  @eam_createAppDeployment_409.1_already_exists (same numbering fix)
- submitApp.feature: @eam_submitApp_409.1_conflict ->
  @eam_submitApp_409.1_already_exists
- deleteApp.feature: @eam_deleteApp_409.1_conflict ->
  @eam_deleteApp_409.1_aborted (matches its spec example, ABORTED not
  ALREADY_EXISTS)
Comment thread code/Test_definitions/edge-application-management-deleteApp.feature Outdated
DLondonoD and others added 2 commits July 31, 2026 14:17
Co-authored-by: Sergi <sergialonsogarcia@gmail.com>
Commit 725880e applied seralogar's suggestion to change deleteApp's
409 $.code from ABORTED to INCOMPATIBLE_STATE (per camaraproject#56, ABORTED is
now only correct for updateAppDeployment's 409), but the scenario tag
was not part of that suggestion diff. Renaming
@eam_deleteApp_409.1_aborted -> @eam_deleteApp_409.1_incompatible_state
to match, as also requested in the same review comment.
@JoseMConde
JoseMConde merged commit d108ef3 into camaraproject:main Jul 31, 2026
2 checks passed
DLondonoD added a commit to DLondonoD/EdgeApplicationManagement that referenced this pull request Jul 31, 2026
Syncs with main after PR camaraproject#62 (fix/issue-53) was merged.
This was referenced Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants