Skip to content

Commit

Permalink
pre-push
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jcieslak committed Nov 20, 2024
1 parent b53359f commit cdbf3fe
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 11 deletions.
3 changes: 2 additions & 1 deletion pkg/acceptance/helpers/information_schema_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package helpers
import (
"context"
"fmt"
"testing"

"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/sdk"
"github.com/stretchr/testify/require"
"testing"
)

type InformationSchemaClient struct {
Expand Down
1 change: 1 addition & 0 deletions pkg/internal/tracking/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package tracking
import (
"context"
"errors"

"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/provider/resources"
)

Expand Down
3 changes: 2 additions & 1 deletion pkg/internal/tracking/context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package tracking

import (
"context"
"testing"

"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/provider/resources"
"github.com/stretchr/testify/require"
"testing"
)

func Test_Context(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/internal/tracking/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func ParseMetadata(sql string) (Metadata, error) {
}
var metadata Metadata
if err := json.Unmarshal([]byte(strings.TrimSpace(parts[1])), &metadata); err != nil {
return Metadata{}, fmt.Errorf("failed to unmarshal metadata from sql: %s, err = %s", sql, err)
return Metadata{}, fmt.Errorf("failed to unmarshal metadata from sql: %s, err = %w", sql, err)
}
if err := metadata.validate(); err != nil {
return Metadata{}, err
Expand Down
3 changes: 2 additions & 1 deletion pkg/internal/tracking/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package tracking
import (
"encoding/json"
"fmt"
"testing"

"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/provider/resources"
"github.com/stretchr/testify/require"
"testing"
)

func TestAppendMetadata(t *testing.T) {
Expand Down
5 changes: 3 additions & 2 deletions pkg/resources/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package resources

import (
"context"
"regexp"
"strings"

"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/internal/tracking"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/provider/resources"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"regexp"
"strings"

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

Expand Down
3 changes: 2 additions & 1 deletion pkg/resources/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import (
"context"
"errors"
"fmt"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/provider/resources"
"log"
"slices"
"strings"

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

"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/helpers"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/internal/collections"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/internal/provider"
Expand Down
3 changes: 2 additions & 1 deletion pkg/sdk/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import (
"context"
"database/sql"
"fmt"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/internal/tracking"
"log"
"os"
"slices"

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

"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/internal/snowflakeenvs"
"github.com/jmoiron/sqlx"
"github.com/luna-duclos/instrumentedsql"
Expand Down
6 changes: 4 additions & 2 deletions pkg/sdk/testint/basic_object_tracking_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package testint
import (
"context"
"fmt"
"strings"
"testing"

"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/sdk"
"github.com/snowflakedb/gosnowflake"
"github.com/stretchr/testify/require"
"strings"
"testing"
)

// Research for basic object tracking done as part of SNOW-1737787
Expand Down Expand Up @@ -70,6 +71,7 @@ func TestInt_ContextQueryTags(t *testing.T) {
}

func executeQueryAndReturnQueryId(t *testing.T, ctx context.Context, client *sdk.Client) string {
t.Helper()
queryIdChan := make(chan string, 1)
ctx = gosnowflake.WithQueryIDChan(ctx, queryIdChan)

Expand Down
3 changes: 2 additions & 1 deletion pkg/sdk/testint/client_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package testint

import (
"context"
"testing"

"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/internal/tracking"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/provider/resources"
"github.com/snowflakedb/gosnowflake"
"github.com/stretchr/testify/require"
"testing"
)

func TestInt_Client_AdditionalMetadata(t *testing.T) {
Expand Down

0 comments on commit cdbf3fe

Please sign in to comment.