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: Refactor functional tests #1721

Merged
merged 3 commits into from
Jan 3, 2024
Merged

fix: Refactor functional tests #1721

merged 3 commits into from
Jan 3, 2024

Conversation

sitaram-kalluri
Copy link
Member

@sitaram-kalluri sitaram-kalluri commented Dec 27, 2023

- What I did

  • In instances where the server holds numerous keys, typically during end-of-test scenarios, the scan responses become large, leading to the transmission of keys in multiple packets. The current "read" method fails in capturing the entirety of the server response.
  • There are situations where the same "atKey" is utilized across multiple tests, potentially resulting in test failures due to inconsistent values. Especially in scenarios related to sync and caching of keys.
  • Additional atSigns are appended to the list for testing enrollment scenarios. However, the ports are omitted in the "docker run" command leading to the atSigns unusable.

- How I did

  • Replace the "read" method in functional test to capture the server response with the "read" method in at_lookup_impl to handle the partial responses from the server.
  • Removed at_demo_credentials and used at_demo_data package. Also add APKAM private and public key for Alice atSign to test enrollment scenario's.
  • Moved the utils classes from "test" folder to "src" folder.
  • Add unique-Id for each key to prevent same key being reused which perhaps might cause inconsistent behaviour in test.
  • Add regex to the scan verb to prevent large numbers of keys being from the server because of which the intended key might be missed due to overloading of buffer capacity.
  • Updated the mounting of ports in docker run command for the new atSigns added.

@sitaram-kalluri sitaram-kalluri linked an issue Dec 28, 2023 that may be closed by this pull request
@gkc
Copy link
Contributor

gkc commented Jan 2, 2024

@sitaram-kalluri Please add an explanation to the PR description of its purpose (i.e. what problems are being addressed by the PR)

Copy link
Contributor

@gkc gkc left a comment

Choose a reason for hiding this comment

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

LGTM but please explain the purpose of the PR

@sitaram-kalluri sitaram-kalluri requested a review from gkc January 3, 2024 02:11
@gkc gkc merged commit 079c962 into trunk Jan 3, 2024
18 checks passed
@gkc gkc deleted the fix_functional_tests branch January 3, 2024 06:52
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.

Refactor at_server functional tests
2 participants