fixed mocks3 data. now mock s3 tests pass. real s3 tests cant pass until the data gets uploaded to s3 see other PR

This commit is contained in:
Alek Westover
2023-07-26 11:45:43 -04:00
parent 6c6b457271
commit e173a218f3
9 changed files with 8 additions and 5 deletions

View File

@@ -131,6 +131,7 @@ pub async fn get_available_extensions(
let public_extensions = ext_index_full["public_extensions"]
.as_array()
.expect("json err");
// TODO: maybe enabled_extensions should be a HashSet? probably doesn't matter
let mut enabled_extensions = public_extensions
.iter()
.map(|x| x.as_str().expect("json err"))

View File

@@ -499,7 +499,7 @@ impl Endpoint {
//
// The proper way to implement this is to pass the custom extension
// in spec, but we don't have a way to do that yet in the python tests.
custom_extensions: Some(vec!["anon".into(), "kq_imcx".into()]),
custom_extensions: Some(vec!["kq_imcx".into()]),
};
let spec_path = self.endpoint_path().join("spec.json");
std::fs::write(spec_path, serde_json::to_string_pretty(&spec)?)?;

View File

@@ -3,15 +3,15 @@
"anon"
],
"library_index": {
"anon": "5648391853/v14/extensions/anon.tar.zst",
"kq_imcx": "5648391853/v14/extensions/kq_imcx.tar.zst"
"anon": "anon",
"kq_imcx": "kq_imcx"
},
"extension_data": {
"kq_imcx": {
"control_data": {
"kq_imcx.control": "# This file is generated content from add_postgresql_extension.\n# No point in modifying it, it will be overwritten anyway.\n\n# Default version, always set\ndefault_version = '0.1'\n\n# Module pathname generated from target shared library name. Use\n# MODULE_PATHNAME in script file.\nmodule_pathname = '$libdir/kq_imcx.so'\n\n# Comment for extension. Set using COMMENT option. Can be set in\n# script file as well.\ncomment = 'ketteQ In-Memory Calendar Extension (IMCX)'\n\n# Encoding for script file. Set using ENCODING option.\n#encoding = ''\n\n# Required extensions. Set using REQUIRES option (multi-valued).\n#requires = ''\ntrusted = true\n"
},
"archive_path": "5648391853/v14/extensions/kq_imcx.tar.zstd"
"archive_path": "5648391853/v14/extensions/kq_imcx.tar.zst"
},
"anon": {
"control_data": {

View File

@@ -11,7 +11,7 @@
"control_data": {
"kq_imcx.control": "# This file is generated content from add_postgresql_extension.\n# No point in modifying it, it will be overwritten anyway.\n\n# Default version, always set\ndefault_version = '0.1'\n\n# Module pathname generated from target shared library name. Use\n# MODULE_PATHNAME in script file.\nmodule_pathname = '$libdir/kq_imcx.so'\n\n# Comment for extension. Set using COMMENT option. Can be set in\n# script file as well.\ncomment = 'ketteQ In-Memory Calendar Extension (IMCX)'\n\n# Encoding for script file. Set using ENCODING option.\n#encoding = ''\n\n# Required extensions. Set using REQUIRES option (multi-valued).\n#requires = ''\ntrusted = true\n"
},
"archive_path": "5648391853/v15/extensions/kq_imcx.tar.zstd"
"archive_path": "5648391853/v15/extensions/kq_imcx.tar.zst"
},
"anon": {
"control_data": {

View File

@@ -113,6 +113,7 @@ def test_remote_extensions(
cleanup(cleanup_files, cleanup_folders)
"""
# Test downloading remote library.
@pytest.mark.parametrize("remote_storage_kind", available_s3_storages())
def test_remote_library(
@@ -182,3 +183,4 @@ def test_remote_library(
pg_version, ["share/postgresql/extension/anon", "download_extensions"]
)
cleanup(cleanup_files, cleanup_folders)
"""