From e35f8f95c6cbe3a743337c8fe9b8311d854e0204 Mon Sep 17 00:00:00 2001 From: p4u1 Date: Fri, 7 Mar 2025 15:20:18 +0100 Subject: [PATCH] fix tests --- pkg/recipe/git_test.go | 9 +++------ pkg/recipe/recipe_test.go | 1 - 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/pkg/recipe/git_test.go b/pkg/recipe/git_test.go index 4753c0ec..32197b83 100644 --- a/pkg/recipe/git_test.go +++ b/pkg/recipe/git_test.go @@ -15,10 +15,6 @@ func TestIsDirty(t *testing.T) { t.Fatal(err) } - if err := r.IsDirty(); err != nil { - t.Fatal(err) - } - assert.False(t, r.Dirty) fpath := filepath.Join(r.Dir, "foo.txt") @@ -31,9 +27,10 @@ func TestIsDirty(t *testing.T) { os.Remove(fpath) }) - if err := r.IsDirty(); err != nil { + dirty, err := r.IsDirty() + if err != nil { t.Fatal(err) } - assert.True(t, r.Dirty) + assert.True(t, dirty) } diff --git a/pkg/recipe/recipe_test.go b/pkg/recipe/recipe_test.go index 00184e79..57a6e6ba 100644 --- a/pkg/recipe/recipe_test.go +++ b/pkg/recipe/recipe_test.go @@ -78,7 +78,6 @@ func TestGet(t *testing.T) { Name: "mygit.org/myorg/cool-recipe", EnvVersion: "1e83340e", EnvVersionRaw: "1e83340e+U", - Dirty: true, Dir: path.Join(cfg.GetAbraDir(), "/recipes/mygit_org_myorg_cool-recipe"), GitURL: "https://mygit.org/myorg/cool-recipe.git", SSHURL: "ssh://git@mygit.org/myorg/cool-recipe.git",