1package daemon23import (4 "testing"56 "github.com/FelineStateMachine/tinyrelay/internal/catalog"7)89func TestForkRelayURLUsesProcessBase(t *testing.T) {10 app := &App{cfg: Config{PublicURL: "https://relay.example"}}11 source := &Tenant{meta: structTenant("alice"), publicURL: "https://relay.example/r/alice"}12 if got := app.forkRelayURL(source, "qa"); got != "https://relay.example/r/qa" {13 t.Fatalf("fork URL = %q", got)14 }15}1617func TestForkRelayURLStripsNestedTenantPath(t *testing.T) {18 app := &App{}19 source := &Tenant{meta: structTenant("alice"), publicURL: "http://relay.example/r/alice"}20 if got := app.forkRelayURL(source, "qa"); got != "http://relay.example/r/qa" {21 t.Fatalf("fork URL = %q", got)22 }23}2425func structTenant(name string) catalog.Tenant { return catalog.Tenant{Name: name} }