-
Notifications
You must be signed in to change notification settings - Fork 81
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
Remove Goerli and migrate network tests on sepolia #1328
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## development #1328 +/- ##
===============================================
- Coverage 97.81% 97.74% -0.07%
===============================================
Files 95 95
Lines 4752 4750 -2
===============================================
- Hits 4648 4643 -5
- Misses 104 107 +3
|
60b14fe
to
a358bfb
Compare
4fbdabd
to
ac2a24e
Compare
c651907
to
d5299ef
Compare
6d706ef
to
b81d01c
Compare
Additional question - I did not check the logs, but I can see network tests are failing. what is the problem? |
0a129c2
to
10375ed
Compare
10375ed
to
c306b00
Compare
) -> Tuple[str, str]: | ||
""" | ||
Deploys an Account and adds fee tokens to its balance (only on devnet). | ||
""" | ||
|
||
network = run_devnet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not convinced of this solution, any better idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand this change tbh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed fixture network which was used in a few places. Currently, we need only the devnet URL which can be obtained by calling run_devnet
but IMO it's a little bit confusing:
@pytest.fixture(name="client", scope="package")
def create_full_node_client(run_devnet) -> FullNodeClient:
return FullNodeClient(node_url=run_devnet + "/rpc")
the idea is to assign run_devnet to network and use
@pytest.fixture(name="client", scope="package")
def create_full_node_client(run_devnet) -> FullNodeClient:
network = run_devnet
return FullNodeClient(node_url=network + "/rpc")
But tbh I don't like this approach
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is run_devnet
s type? is this a function or a string? can we just pass the url, if this is all we need?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's Generator[str, None, None], so if you call run_devnet you will get a string
@pytest.fixture(scope="package")
def run_devnet() -> Generator[str, None, None]:
"""
Runs devnet instance once per module and returns it's address.
"""
devnet_port, proc = start_devnet()
yield f"http://localhost:{devnet_port}"
proc.kill()
before execute it we don't know devnet port
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me it can be either run_devnet_and_get_url
or simply devnet
. In the second option, I would pass devnet
directly without the assignment network = devnet
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
devnet
sounds good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's do that then
Closes #
Introduced changes