jason810496 commented on code in PR #76020:
URL: https://github.com/apache/airflow/pull/76020#discussion_r4450757490


##########
dev/breeze/tests/test_publish_docs_to_s3.py:
##########
@@ -298,3 +298,34 @@ def test_run_publish_packages_metadata(
         self.publish_docs_to_s3.run_publish()
 
         assert mock_generate_packages_metadata.call_count == expected_calls
+
+    @patch.dict(
+        
"airflow_breeze.utils.publish_docs_to_s3.PACKAGES_METADATA_EXCLUDE_VERSIONS",
+        {"java-sdk": ["1.0.0-SNAPSHOT"], "snapshot-only-sdk": 
["1.0.0-SNAPSHOT"]},
+        clear=True,
+    )
+    @patch.object(VersionError, "version_error", False)
+    def test_dump_docs_package_metadata_skips_excluded_versions(self):
+        metadata = self.publish_docs_to_s3.dump_docs_package_metadata(
+            {
+                "java-sdk": ["1.0.0-SNAPSHOT", "1.0.0-beta1"],
+                "snapshot-only-sdk": ["1.0.0-SNAPSHOT"],
+            }
+        )
+
+        assert metadata == [
+            {"package-name": "java-sdk", "all-versions": ["1.0.0b1"], 
"stable-version": "1.0.0b1"},
+        ]
+        assert not VersionError.has_any_error()
+
+    @patch.dict(
+        
"airflow_breeze.utils.publish_docs_to_s3.PACKAGES_METADATA_EXCLUDE_VERSIONS",
+        {"java-sdk": ["1.0.0-SNAPSHOT"]},
+        clear=True,
+    )
+    @patch.object(VersionError, "version_error", False)
+    def test_get_latest_minor_versions_flags_versions_not_excluded(self):

Review Comment:
   Covered in 
https://github.com/apache/airflow/pull/76020/changes/c1959743aec5c8e4f30a5264cea7155d76ccbc1e,
 thanks.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to