Reenable gen test
I had to disable the generation insert test in https://github.com/fastly/js-compute-runtime/pull/1120 because it is consistently failing.
We should investigate the root cause here and reenable the test to be sure the functionality is working correctly.
/cc @vcarvajal-sigsci
Specifically, kv.lookup() should be able to get the generation integer I think, and then that is the integer that should be used on insertion to avoid double insertion. So we might have a misuse of the API.
Alternatively we may have a KV bug either in our implementation or otherwise that this isn't working correctly - either way it needs to be investigated.
I think we might need a kv.lookupWithGeneration since the existing lookup doesn't return the generation integer.
I may be missing something here, but in the same way that lookup returns KVStoreEntry which gives access to metadata (extending the Body interface), it seems to me that KVStoreEntry should also make generation available (it's a u64 so BigInt may be best). then that number can be used when inserting.
generation is available as the third item in the tuple returned from the lookup, and in fact the code that reads it out is commented out (typed incorrectly though, it should be uint64_t).
runtime/fastly/builtins/kv-store.cpp: 316
auto res = pending_lookup.wait();
runtime/fastly/builtins/kv-store.cpp: 329
host_api::HttpBody body = std::get<0>(res.unwrap().value());
host_api::HostBytes metadata = std::move(std::get<1>(res.unwrap().value()));
// uint32_t gen = std::get<2>(res.unwrap());
JS::RootedObject entry(cx, KVStoreEntry::create(cx, body, std::move(metadata)));