Skip to content

Commit

Permalink
Adding integratiion tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mchavez committed Sep 25, 2024
1 parent 121b6c5 commit 4a89da1
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion pkg/connector/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func TestUserBuilderList(t *testing.T) {
require.Nil(t, err)
}

func TestCreateDatasets(t *testing.T) {
func TestCreateDataset(t *testing.T) {
if jsonFilePath == "" {
t.Skip()
}
Expand All @@ -71,3 +71,16 @@ func TestCreateDatasets(t *testing.T) {
err = cliTest.BigQueryClient.Dataset("localdataset").Create(ctxTest, meta)
require.Nil(t, err)
}

func TestDeleteDataset(t *testing.T) {
if jsonFilePath == "" {
t.Skip()
}

cliTest, err := getClientForTesting(ctxTest)
require.Nil(t, err)

// Delete the dataset. Delete will fail if the dataset is not empty.
err = cliTest.BigQueryClient.Dataset("localdataset").Delete(ctxTest)
require.Nil(t, err)
}

0 comments on commit 4a89da1

Please sign in to comment.