Git Repository
Stackyard
Stackyard scannt lokale Entwicklungsordner und bündelt Projekte, Git-Status, TODOs, Toolchains, Docker-Compose-Setups, Datei- und Launcher-Funktionen sowie Operations-Informationen in einer lokalen WebUI.
HTTPS
https://zanvex.de/git/stackyard.gitinternal/project/discovery_test.go
Zum Verzeichnispackage project
import (
"os"
"path/filepath"
"reflect"
"testing"
)
func TestDiscoverMiseTools(t *testing.T) {
dir := t.TempDir()
body := "[tools]\ngo = '1.24.0'\nnode = \"22\"\n"
if err := os.WriteFile(filepath.Join(dir, ".mise.toml"), []byte(body), 0o644); err != nil {
t.Fatalf("write mise file: %v", err)
}
got := DiscoverMiseTools(dir)
want := []string{"go 1.24.0", "node 22"}
if !reflect.DeepEqual(got, want) {
t.Fatalf("unexpected tools: got %#v want %#v", got, want)
}
}
func TestDiscoverPorts(t *testing.T) {
dir := t.TempDir()
body := "ports:\n - \"8080:80\"\nPORT=3000\n"
if err := os.WriteFile(filepath.Join(dir, "docker-compose.yml"), []byte(body), 0o644); err != nil {
t.Fatalf("write compose file: %v", err)
}
got := DiscoverPorts(dir)
want := []int{3000, 8080}
if !reflect.DeepEqual(got, want) {
t.Fatalf("unexpected ports: got %#v want %#v", got, want)
}
}