Skip to content

WebAPI issueses  #425

@mniezgodka

Description

@mniezgodka

Version used

  • AET 3.0.1

Context of the issue/feature

While creating AETs API test I've spotted several API related bugs:

  1. Get artifact by artifact Id for wrong artifactId returns code 500 instead of 400
    request: GET: http://aet-vagrant:8181/api/artifact?company=aet&project=aet&id=99999999
    response: HTTP ERROR 500
    expected reposne: 400 with proper error message
  2. Get metadata api for wrong correlationId returns error message text which doesn't describe the problem:
    request: GET: http://aet-vagrant:8181/api/metadata?company=aet&project=aet&correlationId=99999999
    response:{ "message": "Unable to get Suite Metadata for {company='aet', project='aet'}" }
  3. Get metadata api for wrong suite name returns error message skipping suite name:
    request: GET: http://aet-vagrant:8181/api/metadata?company=aet&project=aet&suite=no_existing_suite
    response:{ "message": "Unable to get Suite Metadata for {company='aet', project='aet'}" }
    expected reposne: { "message": "Unable to get Suite Metadata for no_existing_suite {company='aet', project='aet'}" }
  4. Get metadata by suite name and version for wrong suite version returns error message text which doesn't describe the problem:
    request: GET: http://aet-vagrant:8181/api/metadata?company=aet&project=aet&suite=main&version=999
    response:{ "message": "Unable to get Suite Metadata for {company='aet', project='aet'}" }
  5. Get correlationIds and versions by suite name for not existing suite returns wrong status code (404 instead of 400) with proper error message:
    request: GET: http://aet-vagrant:8181/api/history?company=aet&project=aet&suite=no_existing_suite
    response: 404{"message":"History not found for suite: no_existing_suite {company\u003d\u0027aet\u0027, project\u003d\u0027aet\u0027}"}
  6. Get all locked suites returns JSON object with looks like not valid json object:
    request: GET: http://aet-vagrant:8181/configs/locks
    response:{aet-aet-main2=aet-aet-main2-1540988624814, aet-aet-main=aet-aet-main-1540540651320}

Documentation link: https://github.com/Cognifide/aet/wiki/WebAPI

Metadata

Metadata

Assignees

Labels

bughelp wantedHey, contributor! We need your help.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions