MCPcopy Create free account
hub / github.com/Thunder-Compute/thunder-cli / TestFindInstance_PrefersFirstMatch

Function TestFindInstance_PrefersFirstMatch

cmd/helpers_test.go:62–71  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

60}
61
62func TestFindInstance_PrefersFirstMatch(t *testing.T) {
63 // If ID of one instance matches name of another, ID match wins (it's found first)
64 instances := []api.Instance{
65 {ID: "alpha", UUID: "uuid-1", Name: "first"},
66 {ID: "2", UUID: "uuid-2", Name: "alpha"},
67 }
68 result := findInstance(instances, "alpha")
69 assert.NotNil(t, result)
70 assert.Equal(t, "alpha", result.ID)
71}

Callers

nothing calls this directly

Calls 1

findInstanceFunction · 0.85

Tested by

no test coverage detected