Skip to content

Commit

Permalink
test fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre Fenoll <[email protected]>
  • Loading branch information
fenollp committed Jul 28, 2023
1 parent 88f4dad commit 6b9ed34
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/cwid/pwd_id_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ func TestPwdID(t *testing.T) {
require.NoError(t, err)
filesContain(t, ".monkeh_")
filesContain(t, "_12404825836092798244_")
filesContain(t, "_00000000000000000001.")
filesContain(t, "_00000000000000000001")

// PwdID changes with offset

func(filename string) {

newfilename := strings.Replace(filename, "_00000000000000000001.", "_00000000000000000002.", -1)
newfilename := strings.Replace(filename, "_00000000000000000001", "_00000000000000000002", -1)
err := os.WriteFile(newfilename, nil, 0644)
require.NoError(t, err)
defer os.Remove(newfilename)
Expand All @@ -50,7 +50,7 @@ func TestPwdID(t *testing.T) {
require.NoError(t, err)
filesContain(t, ".monkeh_")
filesContain(t, "_12404825836092798244_")
filesContain(t, "_00000000000000000002.")
filesContain(t, "_00000000000000000002")

}(LogFile())

Expand All @@ -61,7 +61,7 @@ func TestPwdID(t *testing.T) {
require.NoError(t, err)
filesContain(t, ".monkeh_")
filesContain(t, "_2078280350767222314_")
filesContain(t, "_00000000000000000001.")
filesContain(t, "_00000000000000000001")

// No symlinks allowed
func() {
Expand Down

0 comments on commit 6b9ed34

Please sign in to comment.