From cc197fb00b1a8a46ed8adf4c2ad2a71d73d733b3 Mon Sep 17 00:00:00 2001 From: Alek Westover Date: Wed, 26 Jul 2023 15:13:43 -0400 Subject: [PATCH] tested postgis. its fast to download. yay for extension archive --- pgxn/neon/extension_server.c | 3 +-- test_runner/regress/test_download_extensions.py | 13 ++++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/pgxn/neon/extension_server.c b/pgxn/neon/extension_server.c index 01c86867db..6053425de0 100644 --- a/pgxn/neon/extension_server.c +++ b/pgxn/neon/extension_server.c @@ -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) { diff --git a/test_runner/regress/test_download_extensions.py b/test_runner/regress/test_download_extensions.py index 9153dd8bfb..fde61cc44e 100644 --- a/test_runner/regress/test_download_extensions.py +++ b/test_runner/regress/test_download_extensions.py @@ -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: