tested postgis. its fast to download. yay for extension archive

This commit is contained in:
Alek Westover
2023-07-26 15:13:43 -04:00
parent f999db9a9e
commit cc197fb00b
2 changed files with 11 additions and 5 deletions

View File

@@ -59,8 +59,7 @@ neon_download_extension_file_http(const char *filename, bool is_library)
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, compute_ctl_url);
// NOTE: 15L may be insufficient time for large extensions like postgis
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 15L /* seconds */);
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 3L /* seconds */);
if (curl)
{

View File

@@ -90,10 +90,17 @@ def test_remote_extensions(
assert "anon" in all_extensions
assert "kq_imcx" in all_extensions
# TODO: check that we cant't download custom extensions for other tenant ids
# postgis is on real s3 but not mock s3.
# it's kind of a big file, would rather not upload to github
if remote_storage_kind == RemoteStorageKind.REAL_S3:
assert "postgis" in all_extensions
# this is expected to break on my computer because I lack the necesary dependencies
try:
cur.execute("CREATE EXTENSION postgis")
except Exception as err:
log.info(f"(expected) error creating postgis extension: {err}")
# check that we can download private extension
# this is expected to fail because we don't have the pgcrypto extension
# this is expected to fail on my computer because I don't have the pgcrypto extension
try:
cur.execute("CREATE EXTENSION anon")
except Exception as err: