grafana/pkg/tsdb/cloudwatch/models/request/resource_request_test.go
Erik Sundell 017da781cf
Cloudwatch: Refactor dimension values resource request (#57346)
* refactor dimension values backend

* fix test file name
2022-10-24 15:04:25 +02:00

17 lines
391 B
Go

package request
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.Nil(t, request)
assert.Equal(t, "region is required", err.Error())
})
}