Skip to content

Commit f587300

Browse files
authored
Merge pull request #1164 from cloudbees-oss/add-get-tests-from-guess-field
Add get tests from guess field
2 parents a5b12f3 + 54a13f2 commit f587300

22 files changed

+26
-0
lines changed

launchable/commands/subset.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ def __init__(self, app: Application):
378378
self.output_handler = self._default_output_handler
379379
self.exclusion_output_handler = self._default_exclusion_output_handler
380380
self.is_get_tests_from_previous_sessions = is_get_tests_from_previous_sessions
381+
self.is_get_tests_from_guess = is_get_tests_from_guess
381382
self.is_output_exclusion_rules = is_output_exclusion_rules
382383
self.is_get_tests_from_guess = is_get_tests_from_guess
383384
super(Optimize, self).__init__(app=app)
@@ -486,6 +487,7 @@ def get_payload(
486487
},
487488
"ignoreNewTests": ignore_new_tests,
488489
"getTestsFromPreviousSessions": self.is_get_tests_from_previous_sessions,
490+
"getTestsFromGuess": self.is_get_tests_from_guess,
489491
}
490492

491493
if target is not None:

tests/cli_test_case.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ def setUp(self):
4343
if not hasattr(self, 'test_files_dir'):
4444
self.test_files_dir = self.get_test_files_dir()
4545

46+
# not to use cached configuration between tests
47+
responses.reset()
48+
4649
responses.add(
4750
responses.POST,
4851
"{}/intake/organizations/{}/workspaces/{}/builds/{}/test_sessions".format(

tests/data/adb/subset_result.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
"goal": {"type": "subset-by-percentage", "percentage": 0.1},
1212
"ignoreNewTests": false,
1313
"session": { "id": "16" },
14+
"getTestsFromGuess": false,
1415
"getTestsFromPreviousSessions": false
1516
}

tests/data/ant/subset_result.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
"session": { "id": "16" },
88
"goal": {"type": "subset-by-percentage", "percentage": 0.1},
99
"ignoreNewTests": false,
10+
"getTestsFromGuess": false,
1011
"getTestsFromPreviousSessions": false
1112
}

tests/data/bazel/subset_result.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,6 @@
4141
"goal": {"type": "subset-by-percentage", "percentage": 0.1},
4242
"ignoreNewTests": false,
4343
"session": { "id": "16" },
44+
"getTestsFromGuess": false,
4445
"getTestsFromPreviousSessions": false
4546
}

tests/data/behave/subset_result.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
"session": {
99
"id": "16"
1010
},
11+
"getTestsFromGuess": false,
1112
"getTestsFromPreviousSessions": false
1213
}

tests/data/ctest/subset_result.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
"goal": {"type": "subset-by-percentage", "percentage": 0.1},
1010
"ignoreNewTests": false,
1111
"session": { "id": "16" },
12+
"getTestsFromGuess": false,
1213
"getTestsFromPreviousSessions": false
1314
}

tests/data/cts/subset_result.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"id": "16"
3131
},
3232
"ignoreNewTests": false,
33+
"getTestsFromGuess": false,
3334
"getTestsFromPreviousSessions": false,
3435
"goal": {
3536
"type": "subset-by-percentage",

tests/data/cypress/subset_result.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
]
1414
],
1515
"testRunner": "cypress",
16+
"getTestsFromGuess": false,
1617
"getTestsFromPreviousSessions": false
1718
}

tests/data/go_test/subset_result.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
[{"name": "rocket-car-gotest", "type": "class"}, {"name": "TestExample3", "type": "testcase"}],
77
[{"name": "rocket-car-gotest", "type": "class"}, {"name": "TestExample4", "type": "testcase"}]],
88
"testRunner": "go-test",
9+
"getTestsFromGuess": false,
910
"getTestsFromPreviousSessions": false}

0 commit comments

Comments
 (0)