github.com/kotalco/kotal@v0.3.0/controllers/shared/path_test.go (about) 1 package shared 2 3 import "testing" 4 5 const ( 6 testHomeDir = "/users/test" 7 ) 8 9 func TestPathData(t *testing.T) { 10 expected := "/users/test/kotal-data" 11 got := PathData(testHomeDir) 12 13 if got != expected { 14 t.Errorf("expected data directory to be %s, got %s", expected, got) 15 } 16 } 17 18 func TestPathConfig(t *testing.T) { 19 expected := "/users/test/kotal-config" 20 got := PathConfig(testHomeDir) 21 22 if got != expected { 23 t.Errorf("expected configuration directory to be %s, got %s", expected, got) 24 } 25 } 26 27 func TestPathSecrets(t *testing.T) { 28 expected := "/users/test/.kotal-secrets" 29 got := PathSecrets(testHomeDir) 30 31 if got != expected { 32 t.Errorf("expected secrets directory to be %s, got %s", expected, got) 33 } 34 }