Files
bd2/go/cmd/bd2server/dev_command_test.go
T
Flechazo fe67072b7d refactor(all): share core services and streamline launcher workflows
Centralize configuration, logging, database decryption and resource metadata.
Use task dependencies for development, SDK and release builds; move source tools and game downloads to Go with ordered client preparation.
Rename the client to BD2 Launcher, add native icons, and update packaging and SDK checks.
2026-10-14 00:04:21 +08:00

23 lines
692 B
Go

//go:build !release
package main
import (
"os"
"path/filepath"
"testing"
)
func TestDevelopmentPlanDoesNotCreateDataOrReadConfiguration(t *testing.T) {
root := t.TempDir()
data := filepath.Join(root, "server-data")
args := []string{"--dev", "run", "--plan", "--data-dir", data, "--version-config", filepath.Join(root, "missing-versions.json")}
if handled, err := runDevelopmentCommand(args); !handled || err != nil {
t.Fatalf("inspection attempted to start the server with nonexistent inputs: %v, %v", handled, err)
}
entries, err := os.ReadDir(root)
if err != nil || len(entries) != 0 {
t.Fatalf("server inspection created data or configuration: %v, %v", entries, err)
}
}