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

CNS-337: e2e testing for subscription pairing #391

Merged
merged 9 commits into from
May 2, 2023

Conversation

orenl-lava
Copy link
Contributor

@orenl-lava orenl-lava commented Apr 2, 2023

Add plans proposal and subscription testing to E2E testing:

  • add plan proposal
  • "user3" buys subscription to this plan
  • ETH1 tests with "user1" (staked client, as before)
  • LAV1 tests with "user3" (subscription)
  • refactor and improve E2E code

@orenl-lava orenl-lava requested review from omerlavanet and Yaroms April 2, 2023 12:19
@orenl-lava orenl-lava force-pushed the CNS-337-e2e-subscription-pairing branch from e88d626 to 5e02dfa Compare April 2, 2023 12:22
@orenl-lava orenl-lava force-pushed the CNS-337-e2e-subscription-pairing branch 3 times, most recently from 49cf839 to 6010421 Compare April 20, 2023 11:37
@orenl-lava orenl-lava force-pushed the CNS-337-e2e-subscription-pairing branch 3 times, most recently from b55e2b6 to b8f5076 Compare May 1, 2023 10:33
@Yaroms Yaroms force-pushed the CNS-337-e2e-subscription-pairing branch from f1eaf2a to b8f5076 Compare May 1, 2023 12:55
@orenl-lava orenl-lava force-pushed the CNS-337-e2e-subscription-pairing branch 6 times, most recently from 6b098c5 to fcc3431 Compare May 2, 2023 14:26
orenl-lava added 9 commits May 2, 2023 22:47
Signed-off-by: Oren Laadan <orenl@lavanet.xyz>
Introduce execCommand() helper for common code used in several functions.
Signed-off-by: Oren Laadan <orenl@lavanet.xyz>
Add tests that for a client with active subscription ("user3"), similar to the
tests with staked clients.
The e2e timeout was inconsistent:

First, "go test" default timeout is 10 minutes, which it can be changed using
"go test -timeout ...". However, the e2e test internally runs another "go test"
without any argument, so even if the user specified a longer timeout for the
test, the latter would fail within the default timeout.

Second, in at least one place the timeout was hard-coded fixed to 10 minutes.

This is fixed by settings the timeout the intenral "go test" to zero, and then
insteead settings the context.WithTimeout to the timeout requested by the user.
Initially subscription testing was added on top of staked clients, so it
doubled the (already long) test time.

However, it's enough to test staked-clients on ETH1 and subscriptions on
LAV1, as it still provides full coverage of the core functionalty (while
each tests different access methods).

Also generalize the code that invokes client tests so that it can handle
multiple clients (currently up to 3, although we use only 1).
@orenl-lava orenl-lava force-pushed the CNS-337-e2e-subscription-pairing branch from fcc3431 to 223e74c Compare May 2, 2023 15:13
@Yaroms Yaroms merged commit 36018fe into main May 2, 2023
@Yaroms Yaroms deleted the CNS-337-e2e-subscription-pairing branch May 2, 2023 15:45
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