Skip to content

Commit

Permalink
databricks#3950: added initial files for notification_destinations da…
Browse files Browse the repository at this point in the history
…ta resource
  • Loading branch information
dgomez04 committed Oct 3, 2024
1 parent b2c989a commit 20f612f
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
18 changes: 18 additions & 0 deletions settings/data_notification_destinations.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package settings

import (
"context"

"github.com/databricks/databricks-sdk-go"
"github.com/databricks/terraform-provider-databricks/common"
)

func DataSourceNotificationDestinations() common.Resource {
type notificationDestinationsData struct {
Ids []string `json:"ids,omitempty" tf:"computed,slice_set"`
}

return common.WorkspaceData(func(ctx context.Context, data *notificationDestinationsData, w *databricks.WorkspaceClient) error {
return nil
})
}
29 changes: 29 additions & 0 deletions settings/data_notification_destinations_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package settings

import (
"testing"

"github.com/databricks/terraform-provider-databricks/qa"
)

func TestDataSourceNotificationDestinations(t *testing.T) {
qa.ResourceFixture{
Fixtures: []qa.HTTPFixture{
// TODO: run this test to get fixtures
},
Resource: DataSourceNotificationDestinations(),
Read: true,
NonWritable: true,
ID: "_",
}.ApplyNoError(t)
}

func TestCatalogsData_Error(t *testing.T) {
qa.ResourceFixture{
Fixtures: qa.HTTPFailures,
Resource: DataSourceNotificationDestinations(),
Read: true,
NonWritable: true,
ID: "_",
}.ExpectError(t, "i'm a teapot")
}

0 comments on commit 20f612f

Please sign in to comment.