-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
101 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1376,6 +1376,7 @@ def test_semver(self, _: MagicMock) -> None: | |
release_1 = self.create_release(version="[email protected]") | ||
release_2 = self.create_release(version="[email protected]") | ||
release_3 = self.create_release(version="[email protected]") | ||
release_4 = self.create_release(version="[email protected]") | ||
|
||
release_1_g_1 = self.store_event( | ||
data={ | ||
|
@@ -1425,6 +1426,14 @@ def test_semver(self, _: MagicMock) -> None: | |
}, | ||
project_id=self.project.id, | ||
).group.id | ||
release_4_g_1 = self.store_event( | ||
data={ | ||
"timestamp": iso_format(before_now(minutes=7)), | ||
"fingerprint": ["group-7"], | ||
"release": release_4.version, | ||
}, | ||
project_id=self.project.id, | ||
).group.id | ||
self.login_as(user=self.user) | ||
response = self.get_response(sort_by="date", limit=10, query=f"{SEMVER_ALIAS}:>1.2.3") | ||
assert response.status_code == 200, response.content | ||
|
@@ -1433,6 +1442,7 @@ def test_semver(self, _: MagicMock) -> None: | |
release_2_g_2, | ||
release_3_g_1, | ||
release_3_g_2, | ||
release_4_g_1, | ||
] | ||
|
||
response = self.get_response(sort_by="date", limit=10, query=f"{SEMVER_ALIAS}:>=1.2.3") | ||
|
@@ -1444,6 +1454,7 @@ def test_semver(self, _: MagicMock) -> None: | |
release_2_g_2, | ||
release_3_g_1, | ||
release_3_g_2, | ||
release_4_g_1, | ||
] | ||
|
||
response = self.get_response(sort_by="date", limit=10, query=f"{SEMVER_ALIAS}:<1.2.4") | ||
|
@@ -1461,6 +1472,40 @@ def test_semver(self, _: MagicMock) -> None: | |
release_1_g_2, | ||
release_3_g_1, | ||
release_3_g_2, | ||
release_4_g_1, | ||
] | ||
|
||
# Test multiple semver in same filter | ||
response = self.get_response(sort_by="date", limit=10, query=f"{SEMVER_ALIAS}:[1.2.3,1.2.5]") | ||
assert response.status_code == 200, response.content | ||
assert [int(r["id"]) for r in response.json()] == [ | ||
release_1_g_1, | ||
release_1_g_2, | ||
release_2_g_1, | ||
release_2_g_2, | ||
release_3_g_1, | ||
release_3_g_2, | ||
] | ||
|
||
response = self.get_response(sort_by="date", limit=10, query=f"{SEMVER_ALIAS}:[>1.2.3,<2.0.0]") | ||
assert response.status_code == 200, response.content | ||
assert [int(r["id"]) for r in response.json()] == [ | ||
release_2_g_1, | ||
release_2_g_2, | ||
release_3_g_1, | ||
release_3_g_2, | ||
] | ||
|
||
response = self.get_response(sort_by="date", limit=10, query=f"{SEMVER_ALIAS}:[1.2.3,>2.0.0]") | ||
assert response.status_code == 200, response.content | ||
assert [int(r["id"]) for r in response.json()] == [ | ||
release_1_g_1, | ||
release_1_g_2, | ||
release_2_g_1, | ||
release_2_g_2, | ||
release_3_g_1, | ||
release_3_g_2, | ||
release_4_g_1, | ||
] | ||
|
||
def test_release_stage(self, _: MagicMock) -> None: | ||
|
@@ -1653,8 +1698,15 @@ def test_semver_build(self, _: MagicMock) -> None: | |
release_2_g_1, | ||
] | ||
|
||
response = self.get_response(sort_by="date", limit=10, query=f"{SEMVER_BUILD_ALIAS}:[124]") | ||
assert response.status_code == 400, response.content | ||
response = self.get_response( | ||
sort_by="date", limit=10, query=f"{SEMVER_BUILD_ALIAS}:[123,124]" | ||
) | ||
assert response.status_code == 200, response.content | ||
assert [int(r["id"]) for r in response.json()] == [ | ||
release_1_g_1, | ||
release_1_g_2, | ||
release_2_g_1, | ||
] | ||
|
||
def test_aggregate_stats_regression_test(self, _: MagicMock) -> None: | ||
self.store_event( | ||
|