Move SCUM lifecycle ownership to plugin
This commit is contained in:
@@ -872,7 +872,10 @@ func TestCoreServiceManagesAIProviderMetadata(t *testing.T) {
|
||||
func TestCoreServiceRegistersGamePluginManifest(t *testing.T) {
|
||||
svc := newTestCoreService()
|
||||
|
||||
plugin, err := svc.RegisterGamePluginManifest(validPluginManifestRegistration())
|
||||
registration := validPluginManifestRegistration()
|
||||
registration.Manifest.AssetFiles = []domain.PluginAssetFile{{Path: "actions/install.json", Mode: 0o600}, {Path: "bin/install-server", Mode: 0o700}}
|
||||
registration.AssetFiles = []domain.PluginAssetFile{{Path: "actions/install.json", Content: "{}", Mode: 0o600}, {Path: "bin/install-server", Content: "#!/usr/bin/env sh\n"}}
|
||||
plugin, err := svc.RegisterGamePluginManifest(registration)
|
||||
if err != nil {
|
||||
t.Fatalf("register manifest: %v", err)
|
||||
}
|
||||
@@ -894,6 +897,9 @@ func TestCoreServiceRegistersGamePluginManifest(t *testing.T) {
|
||||
if len(plugin.BridgeActions) != 4 || plugin.BridgeActions[0] != string(domain.PluginBridgeActionServerInstancesRead) {
|
||||
t.Fatalf("expected bridge actions, got %+v", plugin.BridgeActions)
|
||||
}
|
||||
if len(plugin.LifecycleAssets) != 2 || plugin.LifecycleAssets[1].Path != "bin/install-server" || plugin.LifecycleAssets[1].Mode != 0o700 {
|
||||
t.Fatalf("expected declared lifecycle assets with manifest mode defaults, got %+v", plugin.LifecycleAssets)
|
||||
}
|
||||
|
||||
listed, err := svc.ListGamePlugins(domain.GamePluginFilter{ServerType: "example", Status: domain.GamePluginStatusInstalled})
|
||||
if err != nil || len(listed) != 1 {
|
||||
|
||||
Reference in New Issue
Block a user