Skip to content

updated test-01-simple to test gateway client #547

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

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

iamkalio
Copy link
Contributor

@iamkalio iamkalio commented May 5, 2025

Addresses #542

@iamkalio iamkalio force-pushed the test/gateway-client branch from 1cc796a to 0be59a0 Compare May 5, 2025 06:30
@iamkalio
Copy link
Contributor Author

iamkalio commented May 5, 2025

Hello @umegbewe @dzikowski
Still in progress, but I would love your feedback.

@dzikowski
Copy link
Contributor

thanks @kalio007

the idea is fine, this is the script we want to update with a gateway test. However I have a few remarks:

  • please don't mute -e flag, it's there to prevent from ignoring errors
  • we should grep the output of the node command and check if it contains Put result: {"success":"OK"}
  • please also adjust the file structure to our conventions (spacing, location of env vars on the top, the style of printed messages). When you run the script locally, the output should look consistent

@iamkalio
Copy link
Contributor Author

iamkalio commented May 9, 2025

Hello @dzikowski , I have updated the test script. I would appreciate your review.

@@ -8,6 +8,10 @@ FABLO_HOME="$TEST_TMP/../../.."

export FABLO_HOME

GATEWAY_CLIENT_DIR="$FABLO_HOME/samples/gateway/node"
ORG1_PEER0_ENV="$TEST_TMP/fablo-target/fabric-config/connection-profiles/connection-profile-org1-peer0.env"
Copy link
Contributor

Choose a reason for hiding this comment

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

TBH I don't like the approach with env file - I think you can define proper variables right before calling the gateway, for instance. It seems more straightforward:

(
  cd "$GATEWAY_CLIENT_DIR" && 
    export \
      CHANNEL_NAME="..." \
      PEER_ORG_NAME="..." \
      ...
  node server.js > "$GATEWAY_CLIENT_OUTPUT_FILE" 2>&1
)

iamkalio and others added 7 commits May 9, 2025 20:05
Signed-off-by: kalio007 <[email protected]>
Co-authored-by: Jakub Dzikowski <[email protected]>
Signed-off-by: Kalio <[email protected]>
Signed-off-by: kalio007 <[email protected]>
Co-authored-by: Jakub Dzikowski <[email protected]>
Signed-off-by: Kalio <[email protected]>
Signed-off-by: kalio007 <[email protected]>
Co-authored-by: Jakub Dzikowski <[email protected]>
Signed-off-by: Kalio <[email protected]>
Signed-off-by: kalio007 <[email protected]>
@iamkalio iamkalio force-pushed the test/gateway-client branch from e77d79a to 8df6d95 Compare May 9, 2025 19:05
@iamkalio iamkalio requested a review from dzikowski May 9, 2025 19:06
@iamkalio
Copy link
Contributor Author

iamkalio commented May 9, 2025

Hi @dzikowski , I have updated the env management. I would like to know if I should change a thing or two, thanks

@dzikowski
Copy link
Contributor

please make sure test are working. You can execute e2e-network/docker scripts also on local machine

@iamkalio
Copy link
Contributor Author

iamkalio commented May 10, 2025

Hello @umegbewe @dzikowski , I've been running into an issue during testing:

EndorseError: 14 UNAVAILABLE: No connection established. Last error: Error: 800C480302000000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355:
It seems related to a TLS mismatch, the test is trying to establish TLS connection with the server but failing. Could you please take a look when you're free?

@iamkalio
Copy link
Contributor Author

Hello @dzikowski, Please check this out when you're free, I'll appreciate your feedback.

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.

2 participants