-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* alpha of v1 flowkit * update to latest version * adding contract do not expose out flowkit * expose flowaddress * fixed pinning of version * upgrade to new version * Coverage and rollback (#107) * testing coverage and rollback * added rollback test * initial support for rollback after each test * stopOnError * TxFN should not store whats in previous tx (#109) * update to released version of flowkit --------- Co-authored-by: Hui Ben <ben@find.xyz> Co-authored-by: Bamthelearner <95492891+Bamthelearner@users.noreply.github.com> * Enhance transaction (#106) * added methods to get stakeholders from events * updated transaction to have more fields built in * added id to event, transactionid-index * fix error if type is nil * change it so that we keep addresses and not types, possibly keep nested fields but not sure * added zap logger to stream tx * tidy * added tx length" * add import stakeholders * fix import stakeholder * fix stakeholder address * added end block to stream * added done flag * revert endHeight change * added method to beta client * fix get imports * add seperate var for imports * Update event.go * Update event.go * ignore --------- Co-authored-by: Hui Ben <ben@find.xyz> Co-authored-by: Bamthelearner <95492891+Bamthelearner@users.noreply.github.com>
- Loading branch information
1 parent
8046858
commit 29a0593
Showing
29 changed files
with
1,336 additions
and
371 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ vendor | |
.idea | ||
profile.cov | ||
test-result.xml | ||
coverage-report.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package example | ||
|
||
import ( | ||
"context" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestExample(t *testing.T) { | ||
|
||
//in order to run a test that will reset to known state in setup_test use the `ot.Run(t,...)``method instead of `t.Run(...)` | ||
ot.Run(t, "Example test", func(t *testing.T) { | ||
block, err := ot.O.GetLatestBlock(context.Background()) | ||
require.NoError(t, err) | ||
assert.Equal(t, 8, int(block.Height)) | ||
|
||
ot.O.MintFlowTokens("first", 1000.0) | ||
require.NoError(t, ot.O.Error) | ||
|
||
block, err = ot.O.GetLatestBlock(context.Background()) | ||
require.NoError(t, err) | ||
assert.Equal(t, 9, int(block.Height)) | ||
|
||
}) | ||
|
||
ot.Run(t, "Example test 2", func(t *testing.T) { | ||
block, err := ot.O.GetLatestBlock(context.Background()) | ||
require.NoError(t, err) | ||
assert.Equal(t, 8, int(block.Height)) | ||
}) | ||
|
||
} |
Oops, something went wrong.