Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

test: pin ZIP timestamp in roster archive helper (#43122)

Aniket Kumar2a1211baa5d8
diff --git a/api/tests/unit_tests/controllers/console/app/test_roster_package_routes.py b/api/tests/unit_tests/controllers/console/app/test_roster_package_routes.py
index d1d8bf60039..03cb772e2ec 100644
--- a/api/tests/unit_tests/controllers/console/app/test_roster_package_routes.py
+++ b/api/tests/unit_tests/controllers/console/app/test_roster_package_routes.py
@@ -33,7 +33,11 @@ from tests.unit_tests.controllers.conftest import ControllerTestServices
def _roster_archive() -> io.BytesIO:
source = io.BytesIO()
with zipfile.ZipFile(source, "w") as archive:
- archive.writestr("manifest.yaml", "format: dify.roster-agent")
+ # Fixed timestamp: passing a filename string stamps the current local
+ # time (2-second ZIP resolution), so two archives built across a
+ # timestamp boundary differ byte-for-byte and flake the assertion below.
+ info = zipfile.ZipInfo("manifest.yaml", date_time=(1980, 1, 1, 0, 0, 0))
+ archive.writestr(info, "format: dify.roster-agent")
source.seek(0)
return source