forked from TrueCloudLab/frostfs-testcases
Update expected errors
Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
This commit is contained in:
parent
f23bfe754e
commit
fc6f9ac162
2 changed files with 10 additions and 4 deletions
|
@ -11,6 +11,7 @@ OBJECT_NOT_FOUND = "code = 2049.*message = object not found"
|
||||||
OBJECT_ALREADY_REMOVED = "code = 2052.*message = object already removed"
|
OBJECT_ALREADY_REMOVED = "code = 2052.*message = object already removed"
|
||||||
SESSION_NOT_FOUND = "code = 4096.*message = session token not found"
|
SESSION_NOT_FOUND = "code = 4096.*message = session token not found"
|
||||||
OUT_OF_RANGE = "code = 2053.*message = out of range"
|
OUT_OF_RANGE = "code = 2053.*message = out of range"
|
||||||
|
EXPIRED_SESSION_TOKEN = "code = 4097.*message = expired session token"
|
||||||
# TODO: Due to https://github.com/nspcc-dev/neofs-node/issues/2092 we have to check only codes until fixed
|
# TODO: Due to https://github.com/nspcc-dev/neofs-node/issues/2092 we have to check only codes until fixed
|
||||||
# OBJECT_IS_LOCKED = "code = 2050.*message = object is locked"
|
# OBJECT_IS_LOCKED = "code = 2050.*message = object is locked"
|
||||||
# LOCK_NON_REGULAR_OBJECT = "code = 2051.*message = ..." will be available once 2092 is fixed
|
# LOCK_NON_REGULAR_OBJECT = "code = 2051.*message = ..." will be available once 2092 is fixed
|
||||||
|
|
|
@ -6,7 +6,12 @@ from cluster import Cluster
|
||||||
from cluster_test_base import ClusterTestBase
|
from cluster_test_base import ClusterTestBase
|
||||||
from epoch import ensure_fresh_epoch
|
from epoch import ensure_fresh_epoch
|
||||||
from file_helper import generate_file
|
from file_helper import generate_file
|
||||||
from grpc_responses import MALFORMED_REQUEST, OBJECT_ACCESS_DENIED, OBJECT_NOT_FOUND
|
from grpc_responses import (
|
||||||
|
EXPIRED_SESSION_TOKEN,
|
||||||
|
MALFORMED_REQUEST,
|
||||||
|
OBJECT_ACCESS_DENIED,
|
||||||
|
OBJECT_NOT_FOUND,
|
||||||
|
)
|
||||||
from neofs_testlib.shell import Shell
|
from neofs_testlib.shell import Shell
|
||||||
from pytest import FixtureRequest
|
from pytest import FixtureRequest
|
||||||
from python_keywords.container import create_container
|
from python_keywords.container import create_container
|
||||||
|
@ -516,7 +521,7 @@ class TestObjectStaticSession(ClusterTestBase):
|
||||||
|
|
||||||
self.tick_epoch()
|
self.tick_epoch()
|
||||||
|
|
||||||
with pytest.raises(Exception, match=MALFORMED_REQUEST):
|
with pytest.raises(Exception, match=EXPIRED_SESSION_TOKEN):
|
||||||
head_object(
|
head_object(
|
||||||
user_wallet.path,
|
user_wallet.path,
|
||||||
container,
|
container,
|
||||||
|
@ -581,7 +586,7 @@ class TestObjectStaticSession(ClusterTestBase):
|
||||||
)
|
)
|
||||||
|
|
||||||
self.tick_epoch()
|
self.tick_epoch()
|
||||||
with pytest.raises(Exception, match=MALFORMED_REQUEST):
|
with pytest.raises(Exception, match=EXPIRED_SESSION_TOKEN):
|
||||||
head_object(
|
head_object(
|
||||||
user_wallet.path,
|
user_wallet.path,
|
||||||
container,
|
container,
|
||||||
|
@ -625,7 +630,7 @@ class TestObjectStaticSession(ClusterTestBase):
|
||||||
expiration,
|
expiration,
|
||||||
)
|
)
|
||||||
|
|
||||||
with pytest.raises(Exception, match=MALFORMED_REQUEST):
|
with pytest.raises(Exception, match=EXPIRED_SESSION_TOKEN):
|
||||||
head_object(
|
head_object(
|
||||||
user_wallet.path,
|
user_wallet.path,
|
||||||
container,
|
container,
|
||||||
|
|
Loading…
Reference in a new issue