Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update cucumber tests for walletffi.feature #3275

Merged
merged 1 commit into from
Sep 2, 2021

Conversation

StriderDM
Copy link
Contributor

@StriderDM StriderDM commented Aug 31, 2021

Description
Made types more explicit for ffi interface and easier to maintain going forwards.
Initialized InterfaceFFI in world rather than WalletFFIClient.
Updated steps in WalletFFI.feature
Updated some const variables in wrapper classes to be let.
Better handling of callback function pointer variables in wallet.
Added additional steps to tests.
Downgrade code to be compatible with nodejs v12.

Motivation and Context

How Has This Been Tested?
nvm use v12.22.6 && ./node_modules/.bin/cucumber-js features/WalletFFI.feature

Run log:
run.log

NodeJS version downgrade:
tari-labs/docker#16

@StriderDM StriderDM force-pushed the cucumber_saf_test branch 3 times, most recently from 656cbb9 to 8314755 Compare September 1, 2021 01:42
Copy link
Collaborator

@stringhandler stringhandler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's wrong with the waitFor method that it needs to be replaced. Wouldn't it be better to fix those?

.circleci/config.yml Outdated Show resolved Hide resolved
integration_tests/features/support/steps.js Outdated Show resolved Hide resolved
integration_tests/features/support/steps.js Outdated Show resolved Hide resolved
stringhandler
stringhandler previously approved these changes Sep 1, 2021
Copy link
Collaborator

@stringhandler stringhandler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

Made types more explicit for ffi interface and easier to maintain going forwards.
Initialized InterfaceFFI in world rather than WalletFFIClient.
Updated steps in WalletFFI.feature
Updated some const variables in wrapper classes to be let.
Better handling of callback function pointer variables in wallet.
Added additional steps to tests.

Update WalletFFI.feature

Update wallet.js

Fixed leak in wallet

Fixed leak for transport in walletFFI client.

Renamed pointer variable for each struct in wrapper to ptr

Review comments

Added waitForIterate to util.
Refer to CString instead of string in interface types.

Replace uint64 type with ulonglong type

Downgrade code to be compatible with NodeJS v12

Update config.yml
@aviator-app aviator-app bot merged commit 38191d3 into tari-project:development Sep 2, 2021
aviator-app bot pushed a commit that referenced this pull request Sep 3, 2021
Description
Exposed TariTransactionKernel instead of TariExcess, TariExcessSignature and TariExcessPublicNonce. This was done as they are all referring to fields from the same object and also to reduce the amount of wrapper classes needs on the other side of the FFI boundary.

Added accessor methods to retrieve data from the opaque pointer for TariTransactionKernel and return the data as a type (in this instance a cstring) which can safely cross the FFI boundary.

Updated library header.
Updated rust tests.
Updated cucumber tests.
Updated comments.
Incremented library version.

Merge #3275 first.

Motivation and Context
---

How Has This Been Tested?
cargo test --all --all-features
nvm use v12.22.6 && ./node_modules/.bin/cucumber-js features/WalletFFI.feature

![Screen Shot 2021-09-02 at 5 08 56 PM](https://user-images.githubusercontent.com/51991544/131870883-4b0175ee-f734-49f5-aeb0-b95842062fa2.png)
Cifko pushed a commit to Cifko/tari that referenced this pull request Sep 10, 2021
Description
Exposed TariTransactionKernel instead of TariExcess, TariExcessSignature and TariExcessPublicNonce. This was done as they are all referring to fields from the same object and also to reduce the amount of wrapper classes needs on the other side of the FFI boundary.

Added accessor methods to retrieve data from the opaque pointer for TariTransactionKernel and return the data as a type (in this instance a cstring) which can safely cross the FFI boundary.

Updated library header.
Updated rust tests.
Updated cucumber tests.
Updated comments.
Incremented library version.

Merge tari-project#3275 first.

Motivation and Context
---

How Has This Been Tested?
cargo test --all --all-features
nvm use v12.22.6 && ./node_modules/.bin/cucumber-js features/WalletFFI.feature

![Screen Shot 2021-09-02 at 5 08 56 PM](https://user-images.githubusercontent.com/51991544/131870883-4b0175ee-f734-49f5-aeb0-b95842062fa2.png)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants