Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kbairak committed Jul 5, 2023
1 parent 6d68ab0 commit 26736f8
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions internal/txlib/migrate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"log"
"os"
"path/filepath"
"regexp"
"strings"
"testing"

Expand Down Expand Up @@ -680,10 +681,16 @@ func TestResourceMigrationFailed(t *testing.T) {
string(content), "projslug1.ares"))
assert.True(t, strings.Contains(
string(content), "o:org:p:projslug2:r:ares2"))
assert.True(t, strings.Contains(
string(content), "minimum_perc = 10"))
assert.True(t, strings.Contains(
string(content), "minimum_perc = 0"))
matched, err := regexp.MatchString(`minimum_perc\s*=\s*10`, string(content))
if err != nil {
t.Error(err)
}
assert.True(t, matched)
matched, err = regexp.MatchString(`minimum_perc\s*=\s*0`, string(content))
if err != nil {
t.Error(err)
}
assert.True(t, matched)
}

func TestBackUpFileCreated(t *testing.T) {
Expand Down

0 comments on commit 26736f8

Please sign in to comment.