@@ -27,10 +27,8 @@ func TestListMonitorDashboards(t *testing.T) {
2727
2828 assert .Equal (t , linodego .DashboardType ("standard" ), clients [0 ].Type , "Expected dashboard type to match" )
2929 assert .Equal (t , linodego .ServiceType ("dbaas" ), clients [0 ].ServiceType , "Expected service_type to match" )
30-
31- // Assert group_by field (on first widget)
32- assert .NotNil (t , clients [0 ].Widgets [0 ].GroupBy , "Expected group_by to be present" )
33- assert .NotEmpty (t , clients [0 ].Widgets [0 ].GroupBy , "group_by should not be empty if present" )
30+ assert .NotEmpty (t , clients [0 ].GroupBy , "Expected group_by to be present at dashboard level" )
31+ assert .Equal (t , []string {"entity_id" }, clients [0 ].GroupBy , "Expected dashboard group_by to match" )
3432
3533 // Assert filters field (optional, on first widget)
3634 if clients [0 ].Widgets [0 ].Filters != nil {
@@ -57,6 +55,8 @@ func TestListMonitorDashboardsByID(t *testing.T) {
5755
5856 assert .Equal (t , linodego .DashboardType ("standard" ), clients .Type , "Expected dashboard type to match" )
5957 assert .Equal (t , linodego .ServiceType ("dbaas" ), clients .ServiceType , "Expected service_type to match" )
58+ assert .NotEmpty (t , clients .GroupBy , "Expected group_by to be present at dashboard level" )
59+ assert .Equal (t , []string {"entity_id" }, clients .GroupBy , "Expected dashboard group_by to match" )
6060}
6161
6262// monitor_dashboard_by_service_type
@@ -79,10 +79,8 @@ func TestListMonitorDashboardsByServiceType(t *testing.T) {
7979
8080 assert .Equal (t , linodego .DashboardType ("standard" ), clients [0 ].Type , "Expected dashboard type to match" )
8181 assert .Equal (t , linodego .ServiceType ("dbaas" ), clients [0 ].ServiceType , "Expected service_type to match" )
82-
83- // Assert group_by field (on first widget)
84- assert .NotNil (t , clients [0 ].Widgets [0 ].GroupBy , "Expected group_by to be present" )
85- assert .NotEmpty (t , clients [0 ].Widgets [0 ].GroupBy , "group_by should not be empty if present" )
82+ assert .NotEmpty (t , clients [0 ].GroupBy , "Expected group_by to be present at dashboard level" )
83+ assert .Equal (t , []string {"entity_id" }, clients [0 ].GroupBy , "Expected dashboard group_by to match" )
8684
8785 // Assert filters field (optional, on first widget)
8886 if clients [0 ].Widgets [0 ].Filters != nil {
0 commit comments