Skip to content

Commit

Permalink
Add test to check ECS Service node id parsing is back-compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
ekimekim committed Feb 3, 2017
1 parent fad3e88 commit 1dcfe58
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions report/id_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,15 @@ func TestEndpointNodeID(t *testing.T) {
}
}
}

func TestECSServiceNodeIDCompat(t *testing.T) {
testID := "my-service;<ecs_service>"
testName := "my-service"
_, name, ok := report.ParseECSServiceNodeID(testID)
if !ok {
t.Errorf("Failed to parse backwards-compatible id %q", testID)
}
if name != testName {
t.Errorf("Backwards-compatible id %q parsed name to %q, expected %q", testID, name, testName)
}
}

0 comments on commit 1dcfe58

Please sign in to comment.