Skip to content

Commit

Permalink
add paths test
Browse files Browse the repository at this point in the history
  • Loading branch information
colesnodgrass committed Jun 26, 2024
1 parent 66797df commit 522b953
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions internal/cmd/local/paths/paths_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package paths

import (
"github.com/google/go-cmp/cmp"
"os"
"path/filepath"
"testing"
)

func Test_Paths(t *testing.T) {
t.Run("UserHome", func(t *testing.T) {
exp, _ := os.UserHomeDir()
if d := cmp.Diff(exp, UserHome); d != "" {
t.Errorf("UserHome mismatch (-want +got):\n%s", d)
}
})
t.Run("Airbyte", func(t *testing.T) {
exp := filepath.Join(UserHome, ".airbyte")
if d := cmp.Diff(exp, Airbyte); d != "" {
t.Errorf("Airbyte mismatch (-want +got):\n%s", d)
}
})
t.Run("AbCtl", func(t *testing.T) {
exp := filepath.Join(UserHome, ".airbyte", "abctl")
if d := cmp.Diff(exp, AbCtl); d != "" {
t.Errorf("AbCtl mismatch (-want +got):\n%s", d)
}
})
t.Run("Data", func(t *testing.T) {
exp := filepath.Join(UserHome, ".airbyte", "abctl", "data")
if d := cmp.Diff(exp, Data); d != "" {
t.Errorf("Data mismatch (-want +got):\n%s", d)
}
})
}

0 comments on commit 522b953

Please sign in to comment.