Skip to content

Commit

Permalink
add equal function and fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
antho1404 committed Sep 6, 2019
1 parent 8aa3282 commit 9f035f0
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 33 deletions.
131 changes: 99 additions & 32 deletions execution/execution.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions protobuf/types/execution.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package types;
option go_package = "github.com/mesg-foundation/engine/execution";

option (gogoproto.goproto_getters_all) = false;
option (gogoproto.equal_all) = true;

// Status represents the status of a single execution.
// Note that a valid execution must have only one status
Expand Down
2 changes: 1 addition & 1 deletion sdk/execution/execution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func TestGet(t *testing.T) {
require.NoError(t, sdk.execDB.Save(exec))
got, err := sdk.Get(exec.Hash)
require.NoError(t, err)
require.Equal(t, exec, got)
require.True(t, exec.Equal(got))
}

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

0 comments on commit 9f035f0

Please sign in to comment.