Rename neofs to frostfs
Signed-off-by: Yulia Kovshova <y.kovshova@yadro.com>
This commit is contained in:
parent
5a2c7ac98d
commit
6d3b6f0f2f
83 changed files with 330 additions and 338 deletions
|
@ -1,15 +1,15 @@
|
|||
from unittest import TestCase
|
||||
from unittest.mock import Mock
|
||||
|
||||
from neofs_testlib.cli import NeofsAdm, NeofsCli, NeoGo
|
||||
from neofs_testlib.cli.cli_command import CliCommand
|
||||
from neofs_testlib.shell.interfaces import CommandOptions, InteractiveInput
|
||||
from frostfs_testlib.cli import FrostfsAdm, FrostfsCli, NeoGo
|
||||
from frostfs_testlib.cli.cli_command import CliCommand
|
||||
from frostfs_testlib.shell.interfaces import CommandOptions, InteractiveInput
|
||||
|
||||
|
||||
class TestCli(TestCase):
|
||||
neofs_adm_exec_path = "neo-adm-exec"
|
||||
neofs_go_exec_path = "neo-go-exec"
|
||||
neofs_cli_exec_path = "neo-cli-exec"
|
||||
frostfs_adm_exec_path = "neo-adm-exec"
|
||||
frostfs_go_exec_path = "neo-go-exec"
|
||||
frostfs_cli_exec_path = "neo-cli-exec"
|
||||
|
||||
address = "0x0000000000000000000"
|
||||
addresses = ["0x000000", "0xDEADBEEF", "0xBABECAFE"]
|
||||
|
@ -30,12 +30,12 @@ class TestCli(TestCase):
|
|||
|
||||
def test_container_create(self):
|
||||
shell = Mock()
|
||||
neofs_cli = NeofsCli(
|
||||
frostfs_cli = FrostfsCli(
|
||||
config_file=self.config_file,
|
||||
neofs_cli_exec_path=self.neofs_cli_exec_path,
|
||||
frostfs_cli_exec_path=self.frostfs_cli_exec_path,
|
||||
shell=shell,
|
||||
)
|
||||
neofs_cli.container.create(
|
||||
frostfs_cli.container.create(
|
||||
rpc_endpoint=self.rpc_endpoint,
|
||||
wallet=self.wallet,
|
||||
basic_acl=self.basic_acl,
|
||||
|
@ -46,7 +46,7 @@ class TestCli(TestCase):
|
|||
|
||||
xhdr = ",".join(f"{param}={value}" for param, value in self.xhdr.items())
|
||||
expected_command = (
|
||||
f"{self.neofs_cli_exec_path} --config {self.config_file} container create "
|
||||
f"{self.frostfs_cli_exec_path} --config {self.config_file} container create "
|
||||
f"--rpc-endpoint '{self.rpc_endpoint}' --wallet '{self.wallet}' "
|
||||
f"--basic-acl '{self.basic_acl}' --await --policy '{self.policy}' "
|
||||
f"--xhdr '{xhdr}'"
|
||||
|
@ -57,7 +57,7 @@ class TestCli(TestCase):
|
|||
def test_bad_wallet_argument(self):
|
||||
shell = Mock()
|
||||
neo_go = NeoGo(
|
||||
shell=shell, config_path=self.config_file, neo_go_exec_path=self.neofs_go_exec_path
|
||||
shell=shell, config_path=self.config_file, neo_go_exec_path=self.frostfs_go_exec_path
|
||||
)
|
||||
with self.assertRaises(Exception) as exc_msg:
|
||||
neo_go.contract.add_group(
|
||||
|
@ -88,7 +88,7 @@ class TestCli(TestCase):
|
|||
def test_wallet_sign(self):
|
||||
shell = Mock()
|
||||
neo_go = NeoGo(
|
||||
shell=shell, config_path=self.config_file, neo_go_exec_path=self.neofs_go_exec_path
|
||||
shell=shell, config_path=self.config_file, neo_go_exec_path=self.frostfs_go_exec_path
|
||||
)
|
||||
neo_go.wallet.sign(
|
||||
input_file=self.file1,
|
||||
|
@ -101,7 +101,7 @@ class TestCli(TestCase):
|
|||
)
|
||||
|
||||
expected_command = (
|
||||
f"{self.neofs_go_exec_path} --config_path {self.config_file} wallet sign "
|
||||
f"{self.frostfs_go_exec_path} --config_path {self.config_file} wallet sign "
|
||||
f"--input-file '{self.file1}' --address '{self.address}' "
|
||||
f"--rpc-endpoint '{self.rpc_endpoint}' --wallet '{self.wallet}' "
|
||||
f"--out '{self.file2}' --timeout '{self.timeout}s'"
|
||||
|
@ -118,12 +118,12 @@ class TestCli(TestCase):
|
|||
|
||||
def test_subnet_create(self):
|
||||
shell = Mock()
|
||||
neofs_adm = NeofsAdm(
|
||||
frostfs_adm = FrostfsAdm(
|
||||
config_file=self.config_file,
|
||||
neofs_adm_exec_path=self.neofs_adm_exec_path,
|
||||
frostfs_adm_exec_path=self.frostfs_adm_exec_path,
|
||||
shell=shell,
|
||||
)
|
||||
neofs_adm.subnet.create(
|
||||
frostfs_adm.subnet.create(
|
||||
address=self.address,
|
||||
rpc_endpoint=self.rpc_endpoint,
|
||||
wallet=self.wallet,
|
||||
|
@ -131,7 +131,7 @@ class TestCli(TestCase):
|
|||
)
|
||||
|
||||
expected_command = (
|
||||
f"{self.neofs_adm_exec_path} --config {self.config_file} morph subnet create "
|
||||
f"{self.frostfs_adm_exec_path} --config {self.config_file} morph subnet create "
|
||||
f"--rpc-endpoint '{self.rpc_endpoint}' --address '{self.address}' "
|
||||
f"--wallet '{self.wallet}' --notary"
|
||||
)
|
||||
|
@ -141,7 +141,7 @@ class TestCli(TestCase):
|
|||
def test_wallet_nep17_multitransfer(self):
|
||||
shell = Mock()
|
||||
neo_go = NeoGo(
|
||||
shell=shell, config_path=self.config_file, neo_go_exec_path=self.neofs_go_exec_path
|
||||
shell=shell, config_path=self.config_file, neo_go_exec_path=self.frostfs_go_exec_path
|
||||
)
|
||||
neo_go.nep17.multitransfer(
|
||||
wallet=self.wallet,
|
||||
|
@ -157,7 +157,7 @@ class TestCli(TestCase):
|
|||
|
||||
to_address = "".join(f" --to '{address}'" for address in self.addresses)
|
||||
expected_command = (
|
||||
f"{self.neofs_go_exec_path} --config_path {self.config_file} "
|
||||
f"{self.frostfs_go_exec_path} --config_path {self.config_file} "
|
||||
f"wallet nep17 multitransfer --token '{self.token}'"
|
||||
f"{to_address} --sysgas '{self.sysgas}' --rpc-endpoint '{self.rpc_endpoint}' "
|
||||
f"--wallet '{self.wallet}' --from '{self.address}' --force --amount {self.amount} "
|
||||
|
@ -168,7 +168,7 @@ class TestCli(TestCase):
|
|||
|
||||
def test_version(self):
|
||||
shell = Mock()
|
||||
neofs_adm = NeofsAdm(shell=shell, neofs_adm_exec_path=self.neofs_adm_exec_path)
|
||||
neofs_adm.version.get()
|
||||
frostfs_adm = FrostfsAdm(shell=shell, frostfs_adm_exec_path=self.frostfs_adm_exec_path)
|
||||
frostfs_adm.version.get()
|
||||
|
||||
shell.exec.assert_called_once_with(f"{self.neofs_adm_exec_path} --version")
|
||||
shell.exec.assert_called_once_with(f"{self.frostfs_adm_exec_path} --version")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue