From 0c4f2911746e93677a8b3a607d7149c0f4064c49 Mon Sep 17 00:00:00 2001 From: Justin Bollinger Date: Wed, 1 Jul 2026 16:17:38 -0400 Subject: [PATCH] test(hashview): skip job tests when server lacks cracked-hash history The live upload-hashfile-job subprocess tests hard-failed when pointed at a hash type the Hashview server has no cracked-hash history for: the hashfile upload succeeds, but Hashview's task planner refuses to create a job ("Not enough data to determine effective tasks for this hash type"). That is a server-side data limitation, not a client defect. Treat that specific message as a skip (after asserting the hashfile upload itself succeeded) across all three upload-job tests, so results don't depend on which hash types have cracked data on the target instance. Co-Authored-By: Claude Opus 4.8 --- ...est_hashview_cli_subcommands_subprocess.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/test_hashview_cli_subcommands_subprocess.py b/tests/test_hashview_cli_subcommands_subprocess.py index 01d8a43..1180606 100644 --- a/tests/test_hashview_cli_subcommands_subprocess.py +++ b/tests/test_hashview_cli_subcommands_subprocess.py @@ -223,6 +223,15 @@ def test_hashview_subcommands_live_upload_hashfile_job(tmp_path): pytest.skip( "HASHVIEW_CUSTOMER_ID does not exist for this API key. Update the env or create the customer." ) + # The hashfile upload itself succeeded, but Hashview's task planner refuses + # to create a job when the server has no cracked-hash history for this hash + # type. That's a server-side data limitation, not a client defect, so treat + # it as a skip rather than a failure. + if "Not enough data to determine effective tasks" in output: + assert ("Hashfile uploaded" in output) or ("Hashfile added" in output), output + pytest.skip( + "Hashview has no cracked-hash history for this hash type; cannot plan job tasks." + ) assert run.returncode == 0, output assert ("Hashfile uploaded" in output) or ("Hashfile added" in output) # Success surfaces the server's job id ("Job ID: N"); a graceful failure @@ -316,6 +325,15 @@ def test_hashview_subcommands_live_upload_hashfile_job_pwdump(tmp_path): pytest.skip( "HASHVIEW_CUSTOMER_ID does not exist for this API key. Update the env or create the customer." ) + # The hashfile upload itself succeeded, but Hashview's task planner refuses + # to create a job when the server has no cracked-hash history for this hash + # type. That's a server-side data limitation, not a client defect, so treat + # it as a skip rather than a failure. + if "Not enough data to determine effective tasks" in output: + assert ("Hashfile uploaded" in output) or ("Hashfile added" in output), output + pytest.skip( + "Hashview has no cracked-hash history for this hash type; cannot plan job tasks." + ) assert run.returncode == 0, output assert ("Hashfile uploaded" in output) or ("Hashfile added" in output) # Success surfaces the server's job id ("Job ID: N"); a graceful failure @@ -403,6 +421,15 @@ def test_hashview_subcommands_live_upload_hashfile_job_hashonly(tmp_path): env=env, ) output = run.stdout + run.stderr + # The hashfile upload itself succeeded, but Hashview's task planner refuses + # to create a job when the server has no cracked-hash history for this hash + # type. That's a server-side data limitation, not a client defect, so treat + # it as a skip rather than a failure. + if "Not enough data to determine effective tasks" in output: + assert ("Hashfile uploaded" in output) or ("Hashfile added" in output), output + pytest.skip( + "Hashview has no cracked-hash history for this hash type; cannot plan job tasks." + ) assert run.returncode == 0, output assert ("Hashfile uploaded" in output) or ("Hashfile added" in output) # Success surfaces the server's job id ("Job ID: N"); a graceful failure