7
7
from arango .exceptions import DatabaseCreateError , ServerVersionError
8
8
9
9
from testcontainers .arangodb import ArangoDbContainer
10
+ import platform
10
11
11
12
ARANGODB_IMAGE_NAME = "arangodb"
13
+ IMAGE_VERSION = "3.11.8"
12
14
13
15
14
16
def arango_test_ops (arango_client , expeced_version , username = "root" , password = "" ):
@@ -50,8 +52,7 @@ def test_docker_run_arango():
50
52
"""
51
53
Test ArangoDB container with default settings.
52
54
"""
53
- image_version = "3.9.1"
54
- image = f"{ ARANGODB_IMAGE_NAME } :{ image_version } "
55
+ image = f"{ ARANGODB_IMAGE_NAME } :{ IMAGE_VERSION } "
55
56
arango_root_password = "passwd"
56
57
57
58
with ArangoDbContainer (image ) as arango :
@@ -62,22 +63,22 @@ def test_docker_run_arango():
62
63
with pytest .raises (DatabaseCreateError ):
63
64
sys_db .create_database ("test" )
64
65
65
- arango_test_ops (arango_client = client , expeced_version = image_version , password = arango_root_password )
66
+ arango_test_ops (arango_client = client , expeced_version = IMAGE_VERSION , password = arango_root_password )
66
67
67
68
68
69
def test_docker_run_arango_without_auth ():
69
70
"""
70
71
Test ArangoDB container with ARANGO_NO_AUTH var set.
71
72
"""
72
- image_version = "3.9.1"
73
- image = f"{ ARANGODB_IMAGE_NAME } :{ image_version } "
73
+ image = f"{ ARANGODB_IMAGE_NAME } :{ IMAGE_VERSION } "
74
74
75
75
with ArangoDbContainer (image , arango_no_auth = True ) as arango :
76
76
client = ArangoClient (hosts = arango .get_connection_url ())
77
77
78
- arango_test_ops (arango_client = client , expeced_version = image_version , password = "" )
78
+ arango_test_ops (arango_client = client , expeced_version = IMAGE_VERSION , password = "" )
79
79
80
80
81
+ @pytest .mark .skipif (platform .processor () == "arm" , reason = "Test does not run on machines with ARM CPU" )
81
82
def test_docker_run_arango_older_version ():
82
83
"""
83
84
Test ArangoDB container with older tag/version.
@@ -100,8 +101,7 @@ def test_docker_run_arango_random_root_password():
100
101
"""
101
102
Test ArangoDB container with ARANGO_RANDOM_ROOT_PASSWORD var set.
102
103
"""
103
- image_version = "3.9.1"
104
- image = f"{ ARANGODB_IMAGE_NAME } :{ image_version } "
104
+ image = f"{ ARANGODB_IMAGE_NAME } :{ IMAGE_VERSION } "
105
105
arango_root_password = "passwd"
106
106
107
107
with ArangoDbContainer (image , arango_random_root_password = True ) as arango :
@@ -110,4 +110,4 @@ def test_docker_run_arango_random_root_password():
110
110
# Test invalid auth (we don't know the password in random mode)
111
111
sys_db = client .db ("_system" , username = "root" , password = arango_root_password )
112
112
with pytest .raises (ServerVersionError ):
113
- assert sys_db .version () == image_version
113
+ assert sys_db .version () == IMAGE_VERSION
0 commit comments