X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=cmd%2Fsafcm%2Fconfig%2Fgroups_test.go;fp=cmd%2Fsafcm%2Fconfig%2Fgroups_test.go;h=cf6cd6e088cd48d3789fb2f618f903eb1e420dcc;hb=641203fda8f7da72c74562c9dc910ca108116f11;hp=b2bf5ec41d9027ecf39ebc6783dec321a936d885;hpb=4299c5d0946ecfa034e9eefe6b16e50bab94a820;p=safcm%2Fsafcm.git diff --git a/cmd/safcm/config/groups_test.go b/cmd/safcm/config/groups_test.go index b2bf5ec..cf6cd6e 100644 --- a/cmd/safcm/config/groups_test.go +++ b/cmd/safcm/config/groups_test.go @@ -18,6 +18,7 @@ package config import ( "fmt" "os" + "path/filepath" "reflect" "testing" @@ -186,7 +187,7 @@ func TestLoadGroups(t *testing.T) { for _, tc := range tests { t.Run(tc.path, func(t *testing.T) { - err := os.Chdir(tc.path) + err := os.Chdir(filepath.Join(cwd, tc.path)) if err != nil { t.Fatal(err) } @@ -201,11 +202,6 @@ func TestLoadGroups(t *testing.T) { t.Errorf("err = %#v, want %#v", err, tc.expErr) } - - err = os.Chdir(cwd) - if err != nil { - t.Fatal(err) - } }) } }