File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,4 +10,7 @@ RUN chown ${PROCESS_USER}:${PROCESS_USER} ${SOLID_HOME}
1010
1111USER ${PROCESS_USER}
1212
13+ # solid configuration
14+ ENV SOLID_ROOT=${SOLID_HOME}/data
15+
1316CMD ["solid" , "start" ]
Original file line number Diff line number Diff line change 1+ import docker
2+ import pytest
3+ import time
4+
5+ testinfra_hosts = ['docker://test_container' ]
6+
7+ @pytest .fixture (scope = "module" , autouse = True )
8+ def container (client , image ):
9+ container = client .containers .run (
10+ image .id ,
11+ name = "test_container" ,
12+ detach = True ,
13+ tty = True
14+ )
15+ # give the solid process some seconds to create the directory structure before making assertions
16+ time .sleep (2 )
17+ yield container
18+ container .remove (force = True )
19+
20+ def test_solid_data_dir_exists_and_owned_by_node (host ):
21+ solid_data = host .file ("/opt/solid/data/" )
22+ assert solid_data .exists
23+ assert solid_data .is_directory
24+ assert solid_data .user == "node"
25+ assert solid_data .group == "node"
26+
27+ def test_solid_db_dir_exists_and_owned_by_node (host ):
28+ solid_db = host .file ("/opt/solid/.db/" )
29+ assert solid_db .exists
30+ assert solid_db .is_directory
31+ assert solid_db .user == "node"
32+ assert solid_db .group == "node"
33+
34+ def test_solid_config_dir_exists_and_owned_by_node (host ):
35+ solid_config = host .file ("/opt/solid/config/" )
36+ assert solid_config .exists
37+ assert solid_config .is_directory
38+ assert solid_config .user == "node"
39+ assert solid_config .group == "node"
You can’t perform that action at this time.
0 commit comments