- Add party plugin registry with Register-before-Boot activation - Add backpack, compass, bonfire, and pact capability interfaces - Add examples/hello with two compiled plugin modules
24 lines
461 B
Go
24 lines
461 B
Go
package compass
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
"testing"
|
|
)
|
|
|
|
func TestLoadStringFromAppSection(t *testing.T) {
|
|
dir := t.TempDir()
|
|
path := filepath.Join(dir, "app.yaml")
|
|
if err := os.WriteFile(path, []byte("name: hello-app\n"), 0o644); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
|
|
cfg, err := Load(dir)
|
|
if err != nil {
|
|
t.Fatalf("Load: %v", err)
|
|
}
|
|
if got := cfg.String("app.name"); got != "hello-app" {
|
|
t.Fatalf("String(app.name) = %q, want hello-app", got)
|
|
}
|
|
}
|