Skip to content

Commit 080d40a

Browse files
committed
Account for BUILD files in tests (count and file list)
1 parent 3520186 commit 080d40a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

st2api/tests/unit/controllers/v1/test_packs_views.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def test_get_pack_files_and_pack_file_ref_doesnt_equal_pack_name(self):
133133
# Ref is not equal to the name, controller should still work
134134
resp = self.app.get("/v1/packs/views/files/dummy_pack_16")
135135
self.assertEqual(resp.status_int, http_client.OK)
136-
self.assertEqual(len(resp.json), 3)
136+
self.assertEqual(len(resp.json), 4)
137137
self.assertIn("pack.yaml", [f["file_path"] for f in resp.json])
138138

139139
resp = self.app.get("/v1/packs/views/file/dummy_pack_16/pack.yaml")

st2common/tests/unit/test_util_file_system.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def test_get_file_list(self):
3030
# Standard exclude pattern
3131
directory = os.path.join(ST2TESTS_DIR, "policies")
3232
expected = [
33+
"BUILD",
3334
"mock_exception.py",
3435
"concurrency.py",
3536
"__init__.py",
@@ -48,6 +49,6 @@ def test_get_file_list(self):
4849
"meta/__init__.py",
4950
]
5051
result = get_file_list(
51-
directory=directory, exclude_patterns=["*.pyc", "*.yaml"]
52+
directory=directory, exclude_patterns=["*.pyc", "*.yaml", "BUILD"]
5253
)
5354
self.assertItemsEqual(expected, result)

0 commit comments

Comments
 (0)