(t *testing.T)
| 60 | } |
| 61 | |
| 62 | func 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 | } |
nothing calls this directly
no test coverage detected