Commit graph

57 commits

Author SHA1 Message Date
Elizaveta Chichindaeva
92cbc2e11b [226] Tests: test for session token for object
A test for session token for object rewritten in pytest.

Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
2022-09-05 14:36:01 +03:00
Elizaveta Chichindaeva
3f6ba19a8b Tests: Storagegroup tests into pytest
Tests for Storagegroups rewritten in pytest

Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
2022-09-05 12:12:26 +03:00
f40111dc4a Implemented neofs-adm lib
Signed-off-by: Vladimir Avdeev <v.avdeev@yadro.com>
2022-08-31 23:52:02 +03:00
7e31610462 Change log collection fixture to put all logs into archive
When collecting logs we dump all of the logs into a directory, because it is RAM-intensive
to keep entire set of logs in memory, especially in a large cluster.
And we attach logs to Allure not as individual files, but as single zip archive, because it
is more convenient to download, attach to bugs, etc.

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-30 13:36:28 +04:00
94d6ec6b12 Add fixture to collect logs after test execution
Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-30 13:36:28 +04:00
6d040c6834 Add ACL and eACL PyTest tests
Signed-off-by: Vladimir Avdeev <v.avdeev@yadro.com>
2022-08-25 14:06:21 +03:00
3294299612 Implement neofs-cli lib for container and object
Signed-off-by: Vladimir Avdeev <v.avdeev@yadro.com>
2022-08-19 09:47:19 +03:00
d935c2cafa Remove step for iptables installation
Installation of iptables was implemented in environment preparation pipeline and tests
do not need to worry about it.
Removed conditions that were checking pytest mode vs robot mode, because we got rid of
robot tests in this branch of codebase.

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-18 14:01:33 +04:00
0ca45d1ba8 Rename variable for GC waiting
We need just an aggregate variable that allows to wait until GC pass occurs on
a storage node, rather than a variable for specific shard. Also, we need to account
for a time that GC session itself takes.

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-18 14:01:33 +04:00
b270f39387 Fix node transition to online state
Node hangs up if we attempt to transfer it to online state immediately after start.

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-18 14:01:33 +04:00
a76614b40d Add asserts for error status codes in grpc responses
Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-18 14:01:33 +04:00
b6b1644fd6 Refactor privileges for ssh commands
Remove logic that checks for root login and prepends command with sudo, because
we should not use root login at all and all commands (that require higher permissions
should be prefixed with sudo anyways).
Add sudo prefix to privileged commands that require it.

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-18 14:01:33 +04:00
f9ba463d2e Refactor container tests
Use wellknown ACL constants.
Remove 0x prefix from ACL, because neofs CLI changed formatting.
Remove redundant comments.

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-18 14:01:33 +04:00
Elizaveta Chichindaeva
186091640f Tests: fix in spelling
Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
2022-08-17 16:20:18 +03:00
e88d64a263 Fix decorator for skipping binary version test
Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-15 18:49:05 +04:00
2b9b0d837d Skip test for binaries versions
It is currently blocked because internal components do not expose versions

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-15 18:49:05 +04:00
c131bb04ba Fix node cleanup step
The intention of the test was not to delete node entirely, but just to erase it's data.

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-15 18:49:05 +04:00
d6861f4f62 Refactor env properties
Encapculate reading/writing environment.properties in helper.

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-15 18:49:05 +04:00
a.y.volkov
9fea2efe83 Check binaries versions
Signed-off-by: a.y.volkov <a.y.volkov@yadro.com>
2022-08-15 18:49:05 +04:00
ce099c61a4 Move node deletion logic to service helper
Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-15 18:49:05 +04:00
91197335ba Add tests that start or stop services on remote vm
Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-15 18:49:05 +04:00
a.y.volkov
f97bfed183 Add test for adding node to cluster
Signed-off-by: a.y.volkov <a.y.volkov@yadro.com>
2022-08-15 18:49:05 +04:00
b468a06f4e Fix hard reboot via sysrq-trigger
Signed-off-by: Vladimir Avdeev <v.avdeev@yadro.com>
2022-08-15 18:49:05 +04:00
448570afa0 Fix get_range usage in acl tests
Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-05 13:31:22 +03:00
eff4b032a5 Refactor fixture that checks cloud environment
Now it relies on presence of sbercloud configuration rather than on free storage setting.

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-05 13:31:22 +03:00
e1d7999313 Cleanup sbercloud config
Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-05 13:31:22 +03:00
47c55f0060 Remove redundant variables
Small refactoring that includes:
 - Removed variables that are not used any more.
 - Cleanup in helper functions' names.

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-05 13:31:17 +03:00
a.y.volkov
642af0a888 Add test for network failover
Signed-off-by: a.y.volkov <a.y.volkov@yadro.com>
2022-08-05 13:29:31 +03:00
892b8f227a Add helper function to wait for GC pass on storage nodes
Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-05 13:29:31 +03:00
05da181998 Add retries when checking presence of buckets in list
Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-05 13:29:31 +03:00
d8911f2490 Fix parsing of CLI output
Formatting has been changed in CLI tools in version v0.30 and it required us to
change logic in tests:
 - Fix authmate output parsing.
 - Fix format of container name in assert.

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-05 13:29:31 +03:00
cccfc41409 [#268]: Rename neofs-cli parameter to expire-at
Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-05 13:29:31 +03:00
6357554ed9 Fix logic that collects versions of binaries
Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-05 13:29:31 +03:00
a.y.volkov
3f12bd75f6 Add storage nodes health check before tests run
Signed-off-by: a.y.volkov <a.y.volkov@yadro.com>
2022-08-05 13:29:31 +03:00
d701e2cb62 Remove redundant environment variables
Along with that few tweaks were made:
 - Increase wait time as it seems to take more time for complex object.
 - Increase timeout for create_bucket as it fails periodically.

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-05 13:29:31 +03:00
ae9c9947b6 Fix logic that checks presense of node in netmap
We are now checking by node's public key as it is represented in netmap.

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-05 13:29:31 +03:00
18e87e3a13 Add delays to http gateway tests
There were 2 delays added:
 - Waiting for GC pass is driven by system design.
 - Waiting after HTTP upload is just termporary workaround.

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-05 13:29:31 +03:00
08081a8629 Fix cleanup of versioned s3 bucket
Add logic that deletes all objects versions from the bucket before attempting to
delete the bucket itself. This is required per AWS S3 specification.

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-05 13:29:31 +03:00
8afba7fca6 Fix assert that checks presence of node in netmap
We should be looking for node host rather than for node name that we assigned in tests code.

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-05 13:29:31 +03:00
568b4421ce Fix object lifetime tests
We should wait for GC pass on storage nodes, because object with expiration is garbage collected
only after epoch ticks.

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-05 13:29:31 +03:00
2c232c222c Fix node management tests
When we call storage node's control endpoint we need to override storage wallet path.

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-05 13:29:31 +03:00
eb5532c08e Extend allure logging for failover tests
Signed-off-by: Vladimir Avdeev <v.avdeev@yadro.com>
2022-08-05 13:29:31 +03:00
b6b95b86e8 Add markers for failover tests
This allows us to skip failover tests during regular run of integration tests.

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-05 13:29:31 +03:00
7026b93c37 Fix SberCloud failovers
Signed-off-by: Vladimir Avdeev <v.avdeev@yadro.com>
2022-08-05 13:29:31 +03:00
ab85389d59 Use neofs-adm to tick epoch
This is a more convenient way to tick epoch when we have multiple moprh blockchain nodes.
Approach that we use in devenv would require multi-signed transaction which is cumbersome.

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-05 13:29:31 +03:00
cbaecc60dc Fix usage of generate_file, prepare_wallet_and_deposit fixtures
Signed-off-by: Vladimir Avdeev <v.avdeev@yadro.com>
2022-08-05 13:29:31 +03:00
f60020f5aa Fix usage of temp_dir fixture
Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-05 13:29:31 +03:00
93a52b4a66 Add failover tests for storage nodes
The tests are aimed to work on cloud infrastructure (SberCloud VMs)

Signed-off-by: Vladimir Avdeev <v.avdeev@yadro.com>
2022-08-05 13:29:31 +03:00
014a1fee95 Enable configuration of wallets directories
Add new variables to common.py that allow:
 - Make paths to wallets configurable.
 - Make devenv services path configurable.

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-05 13:29:31 +03:00
be39480ade Fix node management tests
Remote connection was created to the 1st storage node only. While in reality
we want to create connection to a specific node.

Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
2022-08-05 13:29:30 +03:00