kapua icon indicating copy to clipboard operation
kapua copied to clipboard

Job Description Validation Error

Open code-incubus opened this issue 5 years ago • 1 comments

Describe the bug Found job description validation error.

To Reproduce Steps to reproduce the behavior:

  1. Add the following test scenario:
Scenario: Creating unique job with too long description
  Create a unique job with description that has 256 characters.
  Kapua return an error. Max length for Description is 255 characters.

  Given I prepare a job with name "jobN" and description "ddescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondedescription"
  When I create a new job entity from the existing creator
  And I search for the job in the database
  Then I find a job with description "ddescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondescriptiondedescription"
  And No exception was thrown

  1. Run the scenario.
  2. The test is passed.

Expected behavior An exception of type KapuaIllegalArgumentException or similar should be thrown when creating a new job with a description over 255 characters.

Screenshots /

Version of Kapua [e.g. 1.2.0]

Type of deployment [ ] Local Vagrant deployment [ ] Docker [ ] Openshift (in its variants) [X] Others

Main component affected [ ] Console (in case of console please report info on which browser you encountered the problem) [ ] REST API [ ] Message Broker [X] - Others

Additional context /

code-incubus avatar Feb 18 '20 10:02 code-incubus

After fixing this issue please uncomment all the commented tests that are part of PR #2862.

LeoNerdoG avatar Jun 30 '20 11:06 LeoNerdoG