File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ ENV SOLID_SSL_CERT=${SOLID_HOME}/${TEMPORARY_CERT_NAME}.crt
2323ENV SOLID_PORT=8443
2424ENV DEBUG=solid:*
2525
26+ VOLUME $SOLID_HOME
27+
2628ENTRYPOINT ["./entrypoint.sh" ]
2729
2830CMD ["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 solid_server (client , image ):
9+ container = client .containers .run (
10+ image .id ,
11+ name = "solid_server" ,
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+ @pytest .fixture (scope = "module" , autouse = True )
21+ def container (client , solid_server ):
22+ container = client .containers .run (
23+ 'alpine' ,
24+ name = "test_container" ,
25+ detach = True ,
26+ tty = True ,
27+ volumes_from = solid_server .id
28+ )
29+ # give the solid process some seconds to create the directory structure before making assertions
30+ time .sleep (2 )
31+ yield container
32+ container .remove (force = True )
33+
34+ def test_solid_data_dir_is_mounted (host ):
35+ solid_data = host .file ("/opt/solid/data/" )
36+ assert solid_data .exists
37+ assert solid_data .is_directory
38+
39+ def test_solid_db_dir_is_mounted (host ):
40+ solid_db = host .file ("/opt/solid/.db/" )
41+ assert solid_db .exists
42+ assert solid_db .is_directory
43+
44+ def test_solid_config_dir_is_mounted (host ):
45+ solid_config = host .file ("/opt/solid/config/" )
46+ assert solid_config .exists
47+ assert solid_config .is_directory
You can’t perform that action at this time.
0 commit comments