mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
feat(extensions): add mandatory publisher field to extension metadata (#38200)
This commit is contained in:
@@ -43,10 +43,10 @@ def test_bundle_command_creates_zip_with_default_name(
|
||||
result = cli_runner.invoke(app, ["bundle"])
|
||||
|
||||
assert result.exit_code == 0
|
||||
assert "✅ Bundle created: test_extension-1.0.0.supx" in result.output
|
||||
assert "✅ Bundle created: test-org.test-extension-1.0.0.supx" in result.output
|
||||
|
||||
# Verify zip file was created
|
||||
zip_path = isolated_filesystem / "test_extension-1.0.0.supx"
|
||||
zip_path = isolated_filesystem / "test-org.test-extension-1.0.0.supx"
|
||||
assert_file_exists(zip_path)
|
||||
|
||||
# Verify zip contents
|
||||
@@ -55,7 +55,10 @@ def test_bundle_command_creates_zip_with_default_name(
|
||||
assert "manifest.json" in file_list
|
||||
assert "frontend/dist/remoteEntry.abc123.js" in file_list
|
||||
assert "frontend/dist/main.js" in file_list
|
||||
assert "backend/src/test_extension/__init__.py" in file_list
|
||||
assert (
|
||||
"backend/src/superset_extensions/test_org/test_extension/__init__.py"
|
||||
in file_list
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.cli
|
||||
@@ -100,7 +103,7 @@ def test_bundle_command_with_output_directory(
|
||||
assert result.exit_code == 0
|
||||
|
||||
# Verify zip file was created in output directory
|
||||
expected_path = output_dir / "test_extension-1.0.0.supx"
|
||||
expected_path = output_dir / "test-org.test-extension-1.0.0.supx"
|
||||
assert_file_exists(expected_path)
|
||||
assert f"✅ Bundle created: {expected_path}" in result.output
|
||||
|
||||
@@ -159,8 +162,10 @@ def test_bundle_includes_all_files_recursively(
|
||||
|
||||
# Manifest
|
||||
manifest = {
|
||||
"id": "complex_extension",
|
||||
"name": "Complex Extension",
|
||||
"id": "complex-org.complex-extension",
|
||||
"publisher": "complex-org",
|
||||
"name": "complex-extension",
|
||||
"displayName": "Complex Extension",
|
||||
"version": "2.1.0",
|
||||
"permissions": [],
|
||||
}
|
||||
@@ -191,7 +196,7 @@ def test_bundle_includes_all_files_recursively(
|
||||
assert result.exit_code == 0
|
||||
|
||||
# Verify zip file and contents
|
||||
zip_path = isolated_filesystem / "complex_extension-2.1.0.supx"
|
||||
zip_path = isolated_filesystem / "complex-org.complex-extension-2.1.0.supx"
|
||||
assert_file_exists(zip_path)
|
||||
|
||||
with zipfile.ZipFile(zip_path, "r") as zipf:
|
||||
|
||||
Reference in New Issue
Block a user