Initial commit: AetherForge Linux (forge-mesh) v0.1.0-dev
Some checks failed
Test / test (push) Has been cancelled

This commit is contained in:
drjones
2026-07-04 09:31:23 +00:00
commit 3678b199d0
154 changed files with 21714 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
package handlers
import (
"bytes"
"os"
"path/filepath"
"testing"
"text/template"
)
func TestInstallTemplateExecute(t *testing.T) {
root, _ := filepath.Abs(filepath.Join("..", "..", ".."))
tmplPath := filepath.Join(root, "scripts", "install.sh.tpl")
b, err := os.ReadFile(tmplPath)
if err != nil {
t.Fatal(err)
}
tmpl, err := template.New("install.sh").Parse(string(b))
if err != nil {
t.Fatalf("parse: %v", err)
}
data := installData{
DeckURL: "http://localhost:8989", PublicKey: "abc", FleetSecret: "sec",
}
var buf bytes.Buffer
if err := tmpl.Execute(&buf, data); err != nil {
t.Fatalf("execute: %v", err)
}
}