Skip to content

Commit

Permalink
Rename terraform package
Browse files Browse the repository at this point in the history
  • Loading branch information
mraerino committed Apr 28, 2024
1 parent 95b4ba5 commit c9f0d45
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cmd/tf-preview-gh/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"time"

"github.com/cenkalti/backoff"
"github.com/ffddorf/tf-preview-github/pkg/terraform"
"github.com/ffddorf/tf-preview-github/pkg/tfcontext"
"github.com/go-git/go-git/v5"
"github.com/google/go-github/v57/github"
"github.com/google/uuid"
Expand All @@ -33,7 +33,7 @@ func serveWorkspace(ctx context.Context) (string, error) {
return "", err
}

backend, err := terraform.FindBackend(cwd)
backend, err := tfcontext.FindBackend(cwd)
if err != nil {
return "", err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/terraform/parse.go → pkg/tfcontext/parse.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package terraform
package tfcontext

import (
"errors"
Expand Down
6 changes: 3 additions & 3 deletions pkg/terraform/parse_test.go → pkg/tfcontext/parse_test.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package terraform_test
package tfcontext_test

import (
"testing"

"github.com/ffddorf/tf-preview-github/pkg/terraform"
"github.com/ffddorf/tf-preview-github/pkg/tfcontext"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

func TestFindBackend(t *testing.T) {
be, err := terraform.FindBackend("./testdata")
be, err := tfcontext.FindBackend("./testdata")
require.NoError(t, err)

assert.Equal(t, "https://dummy-backend.example.com/state", be.Address)
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit c9f0d45

Please sign in to comment.