Something went wrong. Try again.
A Kubernetes operator that runs Claude Code sessions on long-horizon work
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637package plugin_test
import ( "slices" "strings" "testing"
"tangled.org/guid.foo/simmer/plugin")
func TestEachPluginsDirectoryIsNamedForItsRepository(t *testing.T) { dirs, err := plugin.Dirs("/plugins", []string{ "ssh://git@forge.example/person/personal.git", "git@forge.example:person/docs.git", "https://forge.example/person/shop/", }) if err != nil { t.Fatal(err) }
want := []string{"/plugins/personal", "/plugins/docs", "/plugins/shop"} if !slices.Equal(dirs, want) { t.Errorf("dirs = %q, want %q", dirs, want) }}
func TestTwoPluginsWithOneNameConflict(t *testing.T) { _, err := plugin.Dirs("/plugins", []string{ "git@forge.example:person/personal.git", "git@elsewhere.example:other/personal.git", })
if err == nil || !strings.Contains(err.Error(), "personal") { t.Errorf("Dirs answered %v, want an error that names personal", err) }}