Skip to content

Commit

Permalink
rename files and remove copywrite
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-swinkler committed Oct 25, 2023
1 parent 949af08 commit 1344d7d
Show file tree
Hide file tree
Showing 599 changed files with 538 additions and 2,274 deletions.
20 changes: 0 additions & 20 deletions .copywrite.hcl

This file was deleted.

4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ role='ACCOUNTADMIN'

For the Terraform resources, there are 3 levels of testing - internal, unit and acceptance tests.

The 'internal' tests are run in the `github.com/Snowflake-Labs/terraform-provider-snowflake/internal/resources` package so that they can test functions that are not exported. These tests are intended to be limited to unit tests for simple functions.
The 'internal' tests are run in the `github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/resources` package so that they can test functions that are not exported. These tests are intended to be limited to unit tests for simple functions.

The 'unit' tests are run in `github.com/Snowflake-Labs/terraform-provider-snowflake/internal/resources_test`, so they only have access to the exported methods of `resources`. These tests exercise the CRUD methods that on the terraform resources. Note that all tests here make use of database mocking and are run locally. This means the tests are fast, but are liable to be wrong in subtle ways (since the mocks are unlikely to be perfect).
The 'unit' tests are run in `github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/resources_test`, so they only have access to the exported methods of `resources`. These tests exercise the CRUD methods that on the terraform resources. Note that all tests here make use of database mocking and are run locally. This means the tests are fast, but are liable to be wrong in subtle ways (since the mocks are unlikely to be perfect).

You can run these first two sets of tests with `make test`.

Expand Down
2 changes: 1 addition & 1 deletion GNUmakefile → Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fmt: ## Run gofumpt

fumpt: fmt

# Generate docs, terraform fmt the examples folder, and create copywrite headers
# Generate docs, terraform fmt the examples folder
generate:
cd tools && go generate ./...

Expand Down
5 changes: 1 addition & 4 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package main

import (
"flag"

"github.com/Snowflake-Labs/terraform-provider-snowflake/internal/provider"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/provider"
"github.com/hashicorp/terraform-plugin-sdk/v2/plugin"
)

Expand Down
7 changes: 2 additions & 5 deletions internal/acceptance/testing.go → pkg/acceptance/testing.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package acceptance

import (
"context"
"sync"
"testing"

"github.com/Snowflake-Labs/terraform-provider-snowflake/internal/provider"
"github.com/Snowflake-Labs/terraform-provider-snowflake/internal/sdk"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/provider"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/sdk"
"github.com/hashicorp/terraform-plugin-go/tfprotov6"
"github.com/hashicorp/terraform-plugin-mux/tf5to6server"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources

import (
"context"
"database/sql"
"log"

"github.com/Snowflake-Labs/terraform-provider-snowflake/internal/sdk"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/sdk"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources_test

import (
Expand Down
5 changes: 1 addition & 4 deletions internal/datasources/alerts.go → pkg/datasources/alerts.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources

import (
"context"
"database/sql"
"log"

"github.com/Snowflake-Labs/terraform-provider-snowflake/internal/sdk"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/sdk"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources

import (
"database/sql"
"fmt"
"log"

"github.com/Snowflake-Labs/terraform-provider-snowflake/internal/snowflake"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources_test

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources

import (
"database/sql"
"fmt"
"log"

"github.com/Snowflake-Labs/terraform-provider-snowflake/internal/snowflake"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources_test

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources

import (
"context"
"database/sql"

"github.com/Snowflake-Labs/terraform-provider-snowflake/internal/sdk"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/sdk"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources_test

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources

import (
"context"
"database/sql"
"log"

"github.com/Snowflake-Labs/terraform-provider-snowflake/internal/sdk"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/sdk"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources_test

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources

import (
"context"
"database/sql"

"github.com/Snowflake-Labs/terraform-provider-snowflake/internal/sdk"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/sdk"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources_test

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources

import (
"context"
"database/sql"
"log"

"github.com/Snowflake-Labs/terraform-provider-snowflake/internal/sdk"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/sdk"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources_test

import (
Expand All @@ -10,9 +7,9 @@ import (
"strings"
"testing"

acc "github.com/Snowflake-Labs/terraform-provider-snowflake/internal/acceptance"
acc "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/acceptance"

"github.com/Snowflake-Labs/terraform-provider-snowflake/internal/sdk"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/sdk"
"github.com/hashicorp/terraform-plugin-testing/config"
"github.com/hashicorp/terraform-plugin-testing/helper/acctest"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources

import (
Expand All @@ -9,7 +6,7 @@ import (
"fmt"
"log"

"github.com/Snowflake-Labs/terraform-provider-snowflake/internal/snowflake"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources_test

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources

import (
Expand All @@ -9,7 +6,7 @@ import (
"fmt"
"log"

"github.com/Snowflake-Labs/terraform-provider-snowflake/internal/snowflake"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources_test

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources

import (
"context"
"database/sql"

"github.com/Snowflake-Labs/terraform-provider-snowflake/internal/sdk"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/sdk"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources_test

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources

import (
"context"
"database/sql"
"fmt"

"github.com/Snowflake-Labs/terraform-provider-snowflake/internal/sdk"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/sdk"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources_test

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources

import (
"database/sql"
"log"

"github.com/Snowflake-Labs/terraform-provider-snowflake/internal/snowflake"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources_test

import (
Expand Down
5 changes: 1 addition & 4 deletions internal/datasources/grants.go → pkg/datasources/grants.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources

import (
"database/sql"

"github.com/Snowflake-Labs/terraform-provider-snowflake/internal/snowflake"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright (c) Snowflake, Inc.
// SPDX-License-Identifier: MIT

package datasources_test

import (
Expand Down
Loading

0 comments on commit 1344d7d

Please sign in to comment.