Files
grafana/pkg/tsdb/cloudwatch/models/resources/resource_request_test.go
Grot (@grafanabot) f3ffc1a495 [v9.3.x] CloudWatch: fix custom namespace for listing dimension keys, refactor to non-pointer types, add test assertions, rename packages (#59130)
CloudWatch: fix custom namespace for listing dimension keys, refactor to non-pointer types, add test assertions, rename packages (#59106)

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
(cherry picked from commit c43e1a721f)

Co-authored-by: Shirley <4163034+fridgepoet@users.noreply.github.com>
2022-11-22 16:25:27 +01:00

17 lines
395 B
Go

package resources
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestResourceRequest(t *testing.T) {
t.Run("Should return an error if region is not provided", func(t *testing.T) {
request, err := GetDimensionValuesRequest(map[string][]string{})
require.Empty(t, request)
assert.Equal(t, "region is required", err.Error())
})
}