Skip to content

Commit

Permalink
test: Sort quads in cayleyimport tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dennwc committed Jul 6, 2024
1 parent e6e0fec commit 1a954c3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/cayleyimport/cayleyimport_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"net"
"net/http"
"path"
"sort"
"testing"

"github.com/cayleygraph/quad"
Expand Down Expand Up @@ -38,6 +39,7 @@ func allQuads(t testing.TB, qs graph.QuadStore) []quad.Quad {
out = append(out, q)
}
require.NoError(t, it.Err())
sort.Sort(quad.ByQuadString(out))
return out
}

Expand Down Expand Up @@ -71,5 +73,6 @@ func TestCayleyImport(t *testing.T) {
err = cmd.Execute()
require.NoError(t, err)
require.Empty(t, b.String())
sort.Sort(quad.ByQuadString(expectData))
require.Equal(t, expectData, allQuads(t, qs))
}

0 comments on commit 1a954c3

Please sign in to comment.