gtristan commented on code in PR #1994:
URL: https://github.com/apache/buildstream/pull/1994#discussion_r2003069046


##########
tests/frontend/show.py:
##########
@@ -553,6 +554,64 @@ def test_strict_dependencies(cli, datafiles, target, 
expected_state):
     assert states[target] == expected_state
 
 
+# This tests that cache keys behave as expected when
+# dependencies have been specified as `strict` and
+# when building in strict mode.
+#
+# This test will:
+#
+#  * Build the target once (and assert that it is cached)
+#  * Modify some local files which are imported
+#    by an import element which the target depends on
+#  * Assert that the cached state of the target element
+#    is as expected
+#
+# We run the test twice, once with an element which strict
+# depends on the changing import element, and one which
+# depends on it regularly.
+#
[email protected](os.path.join(DATA_DIR, "project"))
[email protected](
+    "target, expected_digests",
+    [
+        ("target.bst", {
+            "compose-all.bst": 
"c742f599e198f348ba7600bf50194ae45af6cba759e0005dcd980ad596c51959/78",
+            "import-bin.bst": 
"594334e3e9f15c9eac5b8325befc3f53af8ffbaa664424bb308484abb892944f/77",
+            "import-dev.bst": 
"42203f9284db4817a2fc2d57714c6c92ec318f82a23a25e5325852e5dd6effc3/77",
+            "target.bst": 
"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/0",
+        }),
+    ],
+)
+def test_format_artifact_cas_digest(cli, datafiles, target, expected_digests):

Review Comment:
   This covers some of the conditions I asked for, but I'm interested in really 
determining all of the possible states.
   
   * If the element was never built locally
     * And the element is not existing in the remote cache (covered already, no 
remote used in this test)
     * And the element is available in the remote (... lets find out what the 
behavior is and test for it...)
   * If the element was built locally (covered already)
   * If the element was built locally and then deleted (... lets test, do the 
right bits of the underlying objects go away ? ...)



-- 
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