github.com/mutagen-io/mutagen@v0.18.0-rc1/pkg/agent/paths_test.go (about) 1 package agent 2 3 import ( 4 "strings" 5 "testing" 6 7 "github.com/mutagen-io/mutagen/pkg/mutagen" 8 ) 9 10 // TestInstallPath tests that the installPath method functions correctly. This 11 // has on-disk side-effects (namely creating the agents directory and the 12 // install directory for this version of Mutagen), but they should be harmless. 13 func TestInstallPath(t *testing.T) { 14 // Verify that installPath succeeds. 15 if p, err := installPath(); err != nil { 16 t.Fatal("unable to compute/create install path:", err) 17 } else if p == "" { 18 t.Error("empty install path returned") 19 } else if !strings.Contains(p, mutagen.Version) { 20 t.Error("install path does not contain Mutagen version") 21 } 22 }