diff --git a/.pick_status.json b/.pick_status.json index 17df44d79ec..7047276876a 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -517,7 +517,7 @@ "description": "util/tests: initialise key in cache_test", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "e8495646afb06a9dd7786e9d11f4cdd7ac49279a" }, diff --git a/src/util/tests/cache/cache_test.c b/src/util/tests/cache/cache_test.c index 144fd72173c..ec1587daaee 100644 --- a/src/util/tests/cache/cache_test.c +++ b/src/util/tests/cache/cache_test.c @@ -174,15 +174,16 @@ does_cache_contain(struct disk_cache *cache, const cache_key key) static bool cache_exists(struct disk_cache *cache) { - uint8_t dummy_key[20]; + uint8_t key[20]; char data[] = "some test data"; if (!cache) return NULL; - disk_cache_put(cache, dummy_key, data, sizeof(data), NULL); + disk_cache_compute_key(cache, data, sizeof(data), key); + disk_cache_put(cache, key, data, sizeof(data), NULL); disk_cache_wait_for_idle(cache); - void *result = disk_cache_get(cache, dummy_key, NULL); + void *result = disk_cache_get(cache, key, NULL); free(result); return result != NULL;