Skip to content

Commit e045ecf

Browse files
committed
Restore Pack integration testing
Add `querytype` option to `DigActionTestCase` Add `.st2packs` to Pack tests Format with `black` I think there are 3 actions Drop bionic and el7 Drop parallelism to 2 Reword changelog Bump Orquesta testing timeout
1 parent 666355d commit e045ecf

File tree

7 files changed

+25
-15
lines changed

7 files changed

+25
-15
lines changed

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
# 'machine' executor runs Unit tests ~x1.5 faster, comparing to 'docker' executor
99
# but the fastest is still ~x1.5-2 slower, comparing to Travis
1010
machine: true
11-
parallelism: 4
11+
parallelism: 2
1212
working_directory: ~/st2
1313
steps:
1414
- checkout
@@ -107,7 +107,7 @@ jobs:
107107

108108
# Build & Test st2 packages
109109
packages:
110-
parallelism: 4
110+
parallelism: 2
111111
# 4CPUs & 8GB RAM CircleCI machine
112112
# sadly, it doesn't work with 'setup_remote_docker'
113113
resource_class: large
@@ -116,7 +116,7 @@ jobs:
116116
- image: circleci/python:3.6
117117
working_directory: ~/st2
118118
environment:
119-
- DISTROS: "bionic focal el7 el8"
119+
- DISTROS: "focal el8"
120120
- ST2_PACKAGES_REPO: https://github.com/StackStorm/st2-packages
121121
- ST2_PACKAGES: "st2"
122122
- ST2_CHECKOUT: 0
@@ -222,7 +222,7 @@ jobs:
222222
- image: circleci/ruby:2.7
223223
working_directory: /tmp/deploy
224224
environment:
225-
- DISTROS: "bionic focal el7 el8"
225+
- DISTROS: "focal el8"
226226
steps:
227227
- attach_workspace:
228228
at: .

.github/workflows/ci.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,6 @@ jobs:
665665
666666
./scripts/ci/print-versions.sh
667667
- name: make
668-
if: "${{ env.TASK == 'ci-integration' }}"
669668
#timeout-minutes: 7
670669
# TODO: Use dynamic timeout value based on the branch - for master we
671670
# need to use timeout x2 due to coverage overhead

.github/workflows/orquesta-integration-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ jobs:
189189
run: |
190190
./scripts/ci/print-versions.sh
191191
- name: make
192-
timeout-minutes: 31
192+
timeout-minutes: 41
193193
env:
194194
MAX_ATTEMPTS: 3
195195
RETRY_DELAY: 5

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Python 3.6 is no longer supported; Stackstorm requires at least Python 3.8.
88

99
Fixed
1010
~~~~~
11+
* Restore Pack integration testing (it was inadvertently skipped) and stop testing against `bionic` and `el7`. #6135
1112

1213
Changed
1314
~~~~~~~

contrib/linux/tests/test_action_dig.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ def test_run_with_empty_hostname(self):
2828

2929
# Use the defaults from dig.yaml
3030
result = action.run(
31-
rand=False, count=0, nameserver=None, hostname="", queryopts="short"
31+
rand=False,
32+
count=0,
33+
nameserver=None,
34+
hostname="",
35+
queryopts="short",
36+
querytype="",
3237
)
3338
self.assertIsInstance(result, list)
3439
self.assertEqual(len(result), 0)
@@ -37,7 +42,12 @@ def test_run_with_empty_queryopts(self):
3742
action = self.get_action_instance()
3843

3944
results = action.run(
40-
rand=False, count=0, nameserver=None, hostname="google.com", queryopts=""
45+
rand=False,
46+
count=0,
47+
nameserver=None,
48+
hostname="google.com",
49+
queryopts="",
50+
querytype="",
4151
)
4252
self.assertIsInstance(results, list)
4353

contrib/packs/tests/test_action_download.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def test_run_pack_download(self):
159159
self.assertEqual(result, {"test": "Success."})
160160
self.clone_from.assert_called_once_with(
161161
PACK_INDEX["test"]["repo_url"],
162-
os.path.join(os.path.expanduser("~"), temp_dir),
162+
os.path.join(os.path.expanduser("~"), ".st2packs", temp_dir),
163163
)
164164
self.assertTrue(os.path.isfile(os.path.join(self.repo_base, "test/pack.yaml")))
165165

@@ -182,11 +182,11 @@ def test_run_pack_download_dependencies(self):
182182
self.assertEqual(result, {"test2": "Success.", "test4": "Success."})
183183
self.clone_from.assert_any_call(
184184
PACK_INDEX["test2"]["repo_url"],
185-
os.path.join(os.path.expanduser("~"), temp_dirs[0]),
185+
os.path.join(os.path.expanduser("~"), ".st2packs", temp_dirs[0]),
186186
)
187187
self.clone_from.assert_any_call(
188188
PACK_INDEX["test4"]["repo_url"],
189-
os.path.join(os.path.expanduser("~"), temp_dirs[1]),
189+
os.path.join(os.path.expanduser("~"), ".st2packs", temp_dirs[1]),
190190
)
191191
self.assertEqual(self.clone_from.call_count, 2)
192192
self.assertTrue(os.path.isfile(os.path.join(self.repo_base, "test2/pack.yaml")))
@@ -212,11 +212,11 @@ def test_run_pack_download_multiple_packs(self):
212212
self.assertEqual(result, {"test": "Success.", "test2": "Success."})
213213
self.clone_from.assert_any_call(
214214
PACK_INDEX["test"]["repo_url"],
215-
os.path.join(os.path.expanduser("~"), temp_dirs[0]),
215+
os.path.join(os.path.expanduser("~"), ".st2packs", temp_dirs[0]),
216216
)
217217
self.clone_from.assert_any_call(
218218
PACK_INDEX["test2"]["repo_url"],
219-
os.path.join(os.path.expanduser("~"), temp_dirs[1]),
219+
os.path.join(os.path.expanduser("~"), ".st2packs", temp_dirs[1]),
220220
)
221221
self.assertEqual(self.clone_from.call_count, 2)
222222
self.assertTrue(os.path.isfile(os.path.join(self.repo_base, "test/pack.yaml")))
@@ -687,7 +687,7 @@ def test_run_pack_download_with_tag(self):
687687
self.assertEqual(result, {"test": "Success."})
688688
self.clone_from.assert_called_once_with(
689689
PACK_INDEX["test"]["repo_url"],
690-
os.path.join(os.path.expanduser("~"), temp_dir),
690+
os.path.join(os.path.expanduser("~"), ".st2packs", temp_dir),
691691
)
692692
self.assertTrue(os.path.isfile(os.path.join(self.repo_base, "test/pack.yaml")))
693693

contrib/packs/tests/test_action_unload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def test_run(self):
8585
config_dbs = Config.query(pack=pack)
8686

8787
self.assertEqual(len(pack_dbs), 1)
88-
self.assertEqual(len(action_dbs), 1)
88+
self.assertEqual(len(action_dbs), 3)
8989
self.assertEqual(len(alias_dbs), 3)
9090
self.assertEqual(len(rule_dbs), 1)
9191
self.assertEqual(len(sensor_dbs), 3)

0 commit comments

Comments
 (0)