Add test to check ECS Service node id parsing is back-compatible

This commit is contained in:
Mike Lang
2017-02-03 13:55:11 -08:00
parent fad3e88269
commit 1dcfe58b3d

View File

@@ -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)
}
}