Skip to content

Commit 8e50901

Browse files
remove test_suite_id
1 parent da48f0d commit 8e50901

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

src/main/java/main/controllers/Project/TestController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public TestDto createOrUpdate(TestDto test) throws AqualityException {
5555
if(existingTests.size() > 0) {
5656
TestDto existingTest = existingTests.get(0);
5757
if(existingTest.getSuites() != null) {
58-
TestSuiteDto testSuite = existingTest.getSuites().stream().filter(suite -> suite.getId().equals(test.getTest_suite_id())).findFirst().orElse(null);
58+
TestSuiteDto testSuite = existingTest.getSuites().stream().filter(suite -> suite.getId().equals(test.getSuites().get(0).getId())).findFirst().orElse(null);
5959
if(testSuite != null) {
6060
existingTest.getSuites().add(test.getSuites().get(0));
6161
}

src/main/java/main/view/publicApi/publicTestServlet.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ private void validatePost(TestDto test) throws AqualityParametersException {
4141
throw new AqualityParametersException("You should specify 'id' or/and 'name' suite parameters!");
4242
}
4343

44-
if(test.getTest_suite_id() == null) {
45-
throw new AqualityParametersException("You should specify 'test_suite_id'");
46-
}
47-
4844
if(test.getSuites() == null) {
4945
throw new AqualityParametersException("You should specify 'suites' array with single suite like `[{id: test_suite_id}]`");
5046
}

src/main/webapp/doc/api-doc.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,6 @@ paths:
123123
project_id:
124124
type: integer
125125
example: 1
126-
test_suite_id:
127-
type: integer
128-
example: 12
129126
suites:
130127
type: array
131128
items:
@@ -140,7 +137,7 @@ paths:
140137
schema:
141138
$ref: '#/definitions/Test'
142139
400:
143-
description: 'You have missed one of required parameters you should specify `project_id` AND (`name` AND/OR `id`) AND `test_suite_id` AND `suites`'
140+
description: 'You have missed one of required parameters you should specify `project_id` AND (`name` AND/OR `id`) AND `suites`'
144141
schema:
145142
$ref: '#/definitions/Error'
146143
401:

0 commit comments

Comments
 (0)