diff options
author | Robert Guo <robert.guo@mongodb.com> | 2021-10-25 21:49:47 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-10-27 14:53:00 +0000 |
commit | 908e394d39b223ce498fde0d40e18c9200c188e2 (patch) | |
tree | 54e9a4a358805b658fa96960d54546ba62c6840d /buildscripts/tests | |
parent | 106b96548c5214a8e246a1cf6ac005a3985c16d4 (diff) | |
download | mongo-908e394d39b223ce498fde0d40e18c9200c188e2.tar.gz |
SERVER-60981 write out evg versions file in setup multiversion
Diffstat (limited to 'buildscripts/tests')
-rw-r--r-- | buildscripts/tests/resmokelib/setup_multiversion/test_setup_multiversion.py | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/buildscripts/tests/resmokelib/setup_multiversion/test_setup_multiversion.py b/buildscripts/tests/resmokelib/setup_multiversion/test_setup_multiversion.py index 7c843601e90..979c826fefe 100644 --- a/buildscripts/tests/resmokelib/setup_multiversion/test_setup_multiversion.py +++ b/buildscripts/tests/resmokelib/setup_multiversion/test_setup_multiversion.py @@ -170,8 +170,8 @@ class TestSetupMultiversionGetLatestUrls(TestSetupMultiversionBase): mock_versions_by_project.return_value = DummyIterator() - urls = self.setup_multiversion.get_latest_urls(version) - self.assertEqual(urls, {}) + urlinfo = self.setup_multiversion.get_latest_urls(version) + self.assertEqual(urlinfo.urls, {}) @patch("evergreen.version.Version") @patch("evergreen.api.EvergreenApi.versions_by_project") @@ -182,8 +182,8 @@ class TestSetupMultiversionGetLatestUrls(TestSetupMultiversionBase): mock_versions_by_project.return_value = iter([mock_version]) mock_get_compile_artifact_urls.return_value = {} - urls = self.setup_multiversion.get_latest_urls("4.4") - self.assertEqual(urls, {}) + urlinfo = self.setup_multiversion.get_latest_urls("4.4") + self.assertEqual(urlinfo.urls, {}) @patch("evergreen.version.Version") @patch("evergreen.api.EvergreenApi.versions_by_project") @@ -199,8 +199,8 @@ class TestSetupMultiversionGetLatestUrls(TestSetupMultiversionBase): mock_versions_by_project.return_value = iter([mock_version]) mock_get_compile_artifact_urls.return_value = expected_urls - urls = self.setup_multiversion.get_latest_urls("4.4") - self.assertEqual(urls, expected_urls) + urlinfo = self.setup_multiversion.get_latest_urls("4.4") + self.assertEqual(urlinfo.urls, expected_urls) @patch("evergreen.version.Version") @patch("evergreen.version.Version") @@ -225,8 +225,8 @@ class TestSetupMultiversionGetLatestUrls(TestSetupMultiversionBase): expected_urls, }[evg_api, evg_version, buildvariant_name, ignore_failed_push] - urls = self.setup_multiversion.get_latest_urls("4.4") - self.assertEqual(urls, expected_urls) + urlinfo = self.setup_multiversion.get_latest_urls("4.4") + self.assertEqual(urlinfo.urls, expected_urls) @patch("evergreen.version.Version") @patch("evergreen.version.Version") @@ -259,8 +259,8 @@ class TestSetupMultiversionGetLatestUrls(TestSetupMultiversionBase): expected_urls, }[evg_api, evg_version, buildvariant_name, ignore_failed_push] - urls = self.setup_multiversion.get_latest_urls("master", start_from_revision) - self.assertEqual(urls, expected_urls) + urlinfo = self.setup_multiversion.get_latest_urls("master", start_from_revision) + self.assertEqual(urlinfo.urls, expected_urls) class TestSetupMultiversionGetUrls(TestSetupMultiversionBase): @@ -283,8 +283,8 @@ class TestSetupMultiversionGetUrls(TestSetupMultiversionBase): mock_get_evergreen_version.return_value = mock_version mock_get_compile_artifact_urls.return_value = expected_urls - urls = self.setup_multiversion.get_urls("4.4.1") - self.assertEqual(urls, expected_urls) + urlinfo = self.setup_multiversion.get_urls("4.4.1") + self.assertEqual(urlinfo.urls, expected_urls) @patch("evergreen.version.Version") @patch("buildscripts.resmokelib.utils.evergreen_conn.get_evergreen_version") @@ -301,8 +301,8 @@ class TestSetupMultiversionGetUrls(TestSetupMultiversionBase): mock_get_evergreen_version.return_value = mock_version mock_get_compile_artifact_urls.return_value = expected_urls - urls = self.setup_multiversion.get_urls("90f767adbb1901d007ee4dd8714f53402d893669") - self.assertEqual(urls, expected_urls) + urlinfo = self.setup_multiversion.get_urls("90f767adbb1901d007ee4dd8714f53402d893669") + self.assertEqual(urlinfo.urls, expected_urls) @patch("evergreen.version.Version") @patch("buildscripts.resmokelib.utils.evergreen_conn.get_evergreen_version") @@ -312,13 +312,15 @@ class TestSetupMultiversionGetUrls(TestSetupMultiversionBase): mock_get_evergreen_version, mock_version): mock_get_git_tag_and_commit.return_value = ("r4.4.1", "90f767adbb1901d007ee4dd8714f53402d893669") + mock_version.version_id = "dummy-version-id" mock_version.build_variants_map = {self.buildvariant_name: "build_id"} mock_version.project_identifier = "mongodb-mongo-v4.4" mock_get_evergreen_version.return_value = mock_version mock_get_compile_artifact_urls.return_value = {} - urls = self.setup_multiversion.get_urls("4.4.1") - self.assertEqual(urls, {}) + urlinfo = self.setup_multiversion.get_urls("4.4.1") + self.assertEqual(urlinfo.urls, {}) + self.assertEqual(urlinfo.evg_version_id, mock_version.version_id) @patch("buildscripts.resmokelib.utils.evergreen_conn.get_evergreen_version") @patch("buildscripts.resmokelib.setup_multiversion.github_conn.get_git_tag_and_commit") @@ -327,5 +329,6 @@ class TestSetupMultiversionGetUrls(TestSetupMultiversionBase): "90f767adbb1901d007ee4dd8714f53402d893669") mock_get_evergreen_version.return_value = None - urls = self.setup_multiversion.get_urls("4.4.1") - self.assertEqual(urls, {}) + urlinfo = self.setup_multiversion.get_urls("4.4.1") + self.assertEqual(urlinfo.urls, {}) + self.assertEqual(urlinfo.evg_version_id, None) |