Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Luke Kysow <[email protected]>
  • Loading branch information
jmurret and lkysow authored Jun 3, 2024
1 parent 1de53e9 commit bc56a59
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dependency/health_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,9 @@ func TestHealthServiceQuery_Fetch_SamenessGroup(t *testing.T) {
t.Fatal(err)
}

// Assert that the service instance returned is from the first listed partition.
// This is expected because the service is healthy so it shouldn't failover
// to other partitions.
healthServices := svcs.([]*HealthService)
require.True(t, len(healthServices) == 1)
require.Equal(t, "node"+partitionOne, healthServices[0].Node)
Expand Down Expand Up @@ -800,6 +803,7 @@ func TestHealthServiceQuery_Fetch_SamenessGroup(t *testing.T) {
// Assert - verify the results
expectedResult := []*HealthService{
{
// The instance should now be from the failover partition.
Node: nodeTwo,
NodeAddress: testConsul.Config.Bind,
ServiceMeta: map[string]string{},
Expand Down

0 comments on commit bc56a59

Please sign in to comment.