Skip to content

Commit

Permalink
remove rinkeby & zksync
Browse files Browse the repository at this point in the history
  • Loading branch information
kamirr committed Aug 30, 2023
1 parent e08cf3c commit 664c859
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 51 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ This path will depend either on the shell environment or the operating system on
│   ├── requestor.log
│   ├── router.log
│   ├── test.log # debug console logs from this test case only, duplicated in `runner.log`
│   └── zksync.log
└── test_e2e_wasi
└── ...
```
Expand Down
9 changes: 0 additions & 9 deletions goth/default-assets/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@ services:
image: docker.pkg.github.com/golemfactory/gnt2/gnt2-docker-yagna:483c6f241edd
ports:
- "8545:8545"

zksync:
image: docker.pkg.github.com/golemfactory/yagna-zksync/yagna-zksync-mock:fddc527d2bf1
ports:
- "3030:3030"
environment:
- WEB3_PROVIDER_URI=http://ethereum:8545
depends_on:
- ethereum

outbound-test:
# A service running a TCP sink, echo and iperf3 servers
Expand Down
1 change: 0 additions & 1 deletion goth/default-assets/goth-config-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ docker-compose:

compose-log-patterns:
ethereum: ".*Wallets supplied."
zksync: ".*Running on http://.*:3030/.*"

key-dir: "keys"

Expand Down
1 change: 0 additions & 1 deletion goth/default-assets/goth-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ docker-compose:

compose-log-patterns:
ethereum: ".*Wallets supplied."
zksync: ".*Running on http://.*:3030/.*"

key-dir: "keys"

Expand Down
20 changes: 5 additions & 15 deletions goth/payment_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,6 @@
REQUIRED_CONFIRMATIONS_COUNT = 0

_payment_config = {
"zksync": {
"env": {
"YA_PAYMENT_NETWORK": "rinkeby",
"ZKSYNC_FAUCET_ADDR": "http://zksync:3030/zk/donatex",
"ZKSYNC_RINKEBY_RPC_ADDRESS": "http://zksync:3030",
},
"driver": "zksync",
"network": "rinkeby",
"token": "tGLM",
},
"erc20_mainnet": {
"env": {
"ERC20_MAINNET_REQUIRED_CONFIRMATIONS": REQUIRED_CONFIRMATIONS_COUNT,
Expand All @@ -33,13 +23,13 @@
},
"erc20": {
"env": {
"ERC20_RINKEBY_REQUIRED_CONFIRMATIONS": REQUIRED_CONFIRMATIONS_COUNT,
"RINKEBY_GETH_ADDR": GETH_ADDR,
"RINKEBY_TGLM_CONTRACT_ADDRESS": GLM_CONTRACT_ADDRESS,
"YA_PAYMENT_NETWORK": "rinkeby",
"ERC20_GOERLI_REQUIRED_CONFIRMATIONS": REQUIRED_CONFIRMATIONS_COUNT,
"GOERLI_GETH_ADDR": GETH_ADDR,
"GOERLI_TGLM_CONTRACT_ADDRESS": GLM_CONTRACT_ADDRESS,
"YA_PAYMENT_NETWORK": "goerli",
},
"driver": "erc20",
"network": "rinkeby",
"network": "goerli",
"token": "tGLM",
},
"polygon": {
Expand Down
15 changes: 5 additions & 10 deletions test/integration/test_payment_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,17 @@
"POLYGON_GETH_ADDR": "http://ethereum:8545",
"POLYGON_GLM_CONTRACT_ADDRESS": "0xFDFEF9D10d929cB3905C71400ce6be1990EA0F34",
},
"zksync": {
"YA_PAYMENT_NETWORK": "rinkeby",
"ZKSYNC_RINKEBY_RPC_ADDRESS": "http://zksync:3030",
"ZKSYNC_FAUCET_ADDR": "http://zksync:3030/zk/donatex",
},
"erc20_mainnet": {
"YA_PAYMENT_NETWORK": "mainnet",
"MAINNET_GETH_ADDR": "http://ethereum:8545",
"MAINNET_GLM_CONTRACT_ADDRESS": "0xFDFEF9D10d929cB3905C71400ce6be1990EA0F34",
"ERC20_MAINNET_REQUIRED_CONFIRMATIONS": 0,
},
"erc20": {
"YA_PAYMENT_NETWORK": "rinkeby",
"RINKEBY_GETH_ADDR": "http://ethereum:8545",
"RINKEBY_TGLM_CONTRACT_ADDRESS": "0xFDFEF9D10d929cB3905C71400ce6be1990EA0F34",
"ERC20_RINKEBY_REQUIRED_CONFIRMATIONS": 0,
"YA_PAYMENT_NETWORK": "goerli",
"GOERLI_GETH_ADDR": "http://ethereum:8545",
"GOERLI_TGLM_CONTRACT_ADDRESS": "0xFDFEF9D10d929cB3905C71400ce6be1990EA0F34",
"ERC20_GOERLI_REQUIRED_CONFIRMATIONS": 0,
},
}

Expand All @@ -41,7 +36,7 @@ async def test_default_payment_platform(default_goth_config: Path) -> None:
assert env[key] == val


@pytest.mark.parametrize("payment_config", ("zksync", "erc20_mainnet", "erc20", "polygon"))
@pytest.mark.parametrize("payment_config", ("erc20_mainnet", "erc20", "polygon"))
@pytest.mark.asyncio
async def test_payment_platform_env(default_goth_config: Path, payment_config) -> None:
"""Test if "payment_config" param in config file works."""
Expand Down
1 change: 0 additions & 1 deletion test/unit/configuration/test-assets/goth-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ docker-compose:

compose-log-patterns:
ethereum: ".*Wallets supplied."
zksync: ".*Running on http://.*:3030/.*"


key-dir: "keys"
Expand Down
2 changes: 1 addition & 1 deletion test/unit/configuration/test_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_parse_default_config(test_config_file: Path):
def test_load_yaml_override_existing(test_config_file: Path):
"""Test overriding an existing field in a YAML config file."""

test_key = "zksync"
test_key = "erc20"
test_value = ".*I am overridden!.*"
overrides = [
(f"docker-compose.compose-log-patterns.{test_key}", test_value),
Expand Down
10 changes: 5 additions & 5 deletions test/unit/runner/cli/test_yagna_payment_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,31 @@ def test_payment_init(yagna_container):

yagna = Cli(yagna_container).yagna

yagna.payment_init("zksync")
yagna.payment_init("erc20")


def test_payment_init_provider_mode(yagna_container):
"""Test `payment init --receiver`."""

yagna = Cli(yagna_container).yagna

yagna.payment_init("zksync", receiver_mode=True)
yagna.payment_init("erc20", receiver_mode=True)


def test_payment_init_requestor_mode(yagna_container):
"""Test `payment init --sender`."""

yagna = Cli(yagna_container).yagna

yagna.payment_init("zksync", sender_mode=True)
yagna.payment_init("erc20", sender_mode=True)


def test_payment_status(yagna_container):
"""Test `payment status` subcommand."""

yagna = Cli(yagna_container).yagna

status = yagna.payment_status("zksync")
status = yagna.payment_status("erc20")
assert status


Expand All @@ -41,5 +41,5 @@ def test_payment_status_with_address(yagna_container):

yagna = Cli(yagna_container).yagna

status = yagna.payment_status("zksync")
status = yagna.payment_status("erc20")
assert status
10 changes: 5 additions & 5 deletions test/unit/runner/container/test_payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def payment_id_pool() -> PaymentIdPool:
return PaymentIdPool()


@pytest.mark.parametrize("payment_config_name", ("erc20", "zksync"))
@pytest.mark.parametrize("payment_config_name", ("erc20"))
def test_get_id(payment_id_pool, payment_config_name):
"""Test if pre-funded payment accounts are generated correctly."""
receive = False
Expand All @@ -36,7 +36,7 @@ def test_get_id(payment_id_pool, payment_config_name):
assert account.send == send


@pytest.mark.parametrize("payment_config_name", ("erc20", "zksync"))
@pytest.mark.parametrize("payment_config_name", ("erc20"))
def test_get_id_with_address(payment_id_pool, payment_config_name):
"""Test if pre-funded payment accounts can be found by address."""
receive = False
Expand All @@ -62,7 +62,7 @@ def test_get_id_with_address(payment_id_pool, payment_config_name):
assert account.send == send


@pytest.mark.parametrize("payment_config_name", ("erc20", "zksync"))
@pytest.mark.parametrize("payment_config_name", ("erc20"))
def test_get_id_with_address_removes_from_pool(payment_id_pool, payment_config_name):
"""Test if found pre-funded payment accounts is removed from pool."""

Expand All @@ -85,7 +85,7 @@ def test_get_id_with_address_removes_from_pool(payment_id_pool, payment_config_n
def test_key_pool_depleted(payment_id_pool):
"""Test if the proper exception is raised when we run out of pre-funded keys."""

any_payment_config = get_payment_config("zksync")
any_payment_config = get_payment_config("erc20")
with pytest.raises(KeyPoolDepletedError):
while True:
payment_id_pool.get_id(any_payment_config)
Expand All @@ -94,7 +94,7 @@ def test_key_pool_depleted(payment_id_pool):
def test_key_not_found(payment_id_pool):
"""Test if the proper exception is raised when no pre-funded key with given address."""

any_payment_config = get_payment_config("zksync")
any_payment_config = get_payment_config("erc20")
address_not_in_pool = "0000000000000000000000000000000000000000"
with pytest.raises(KeyNotFoundError):
payment_id_pool.get_id(
Expand Down
4 changes: 2 additions & 2 deletions test/unit/runner/test_shutdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ def apply_global_monkeypatches(monkeypatch):
YagnaContainerConfig(
name="requestor",
probe_type=Probe,
payment_config=get_payment_config("zksync"),
payment_config=get_payment_config("erc20"),
volumes={},
environment={},
payment_id=mock.MagicMock(),
),
YagnaContainerConfig(
name="provider",
probe_type=Probe,
payment_config=get_payment_config("zksync"),
payment_config=get_payment_config("erc20"),
volumes={},
environment={},
privileged_mode=False,
Expand Down

0 comments on commit 664c859

Please sign in to comment.