Add package update/export tests and mark v0.5.4 done in roadmap

14 new tests: version bump, rejection cases (same/older/core/type/id
mismatch), schema add column/table with data preservation, settings
merge, export with valid zip, default allowlist, wildcard allowlist.
Existing bundled tests updated for curated default behavior.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-30 18:39:24 +00:00
parent f1f59fde57
commit 91fb07b7e5
3 changed files with 505 additions and 10 deletions

View File

@@ -88,7 +88,7 @@ func TestBundledInstall_FreshDB(t *testing.T) {
"route": "/s/test-b",
})
InstallBundledPackages(bundledDir, packagesDir, "", stores, nil)
InstallBundledPackages(bundledDir, packagesDir, "*", stores, nil)
// Both packages should be installed and enabled
for _, id := range []string{"test-surface-a", "test-surface-b"} {
@@ -127,7 +127,7 @@ func TestBundledInstall_SkipsExisting(t *testing.T) {
"type": "surface",
})
InstallBundledPackages(bundledDir, packagesDir, "", stores, nil)
InstallBundledPackages(bundledDir, packagesDir, "*", stores, nil)
// Package should retain original title (not overwritten)
pkg, err := stores.Packages.Get(ctx, "pre-existing")
@@ -174,7 +174,7 @@ func TestBundledInstall_DormantPackage(t *testing.T) {
"requires": []string{"chat"},
})
InstallBundledPackages(bundledDir, packagesDir, "", stores, nil)
InstallBundledPackages(bundledDir, packagesDir, "*", stores, nil)
pkg, err := stores.Packages.Get(ctx, "dormant-pkg")
if err != nil || pkg == nil {