@@ -27,9 +27,13 @@ def test_directories(host, dirs):
27
27
28
28
@pytest .mark .parametrize ("files" , [
29
29
"/cortex/cortex-ingester.yml" ,
30
+ "/cortex/cortex-compactor.yml" ,
31
+ "/cortex/cortex-readpath.yml" ,
30
32
"/etc/systemd/system/[email protected] " ,
31
33
"/usr/local/bin/cortex-linux-amd64" ,
32
34
"/etc/default/cortex-ingester" ,
35
+ "/etc/default/cortex-readpath" ,
36
+ "/etc/default/cortex-compactor" ,
33
37
])
34
38
def test_files (host , files ):
35
39
f = host .file (files )
@@ -42,13 +46,18 @@ def test_user(host):
42
46
assert host .user ("vortex" ).exists
43
47
44
48
45
- def test_service (host ):
46
- s = host .service ("cortex@ingester" )
47
- # assert s.is_enabled
49
+ @pytest .mark .parametrize ("service" , [
50
+ "ingester" ,
51
+ "readpath" ,
52
+ "compactor" ,
53
+ ])
54
+ def test_service (host , service ):
55
+ s = host .service ("cortex@%s" % service )
56
+ assert s .is_enabled
48
57
assert s .is_running
49
58
50
59
51
- @pytest .mark .parametrize ("port" , [9009 , 9010 , 9095 , 9096 ])
60
+ @pytest .mark .parametrize ("port" , [9009 , 9010 , 9095 , 9096 , 9011 , 9097 ])
52
61
def test_socket (host , port ):
53
62
s = host .socket ("tcp://0.0.0.0:%d" % port )
54
63
assert s .is_listening
@@ -66,15 +75,20 @@ def test_config_file_explicit_target(host):
66
75
assert config ["target" ] == "querier,store-gateway"
67
76
68
77
69
- def test_string (host ):
78
+ def test_env_ingester (host ):
70
79
f = host .file ("/etc/default/cortex-ingester" )
71
80
assert "KAEGER_AGENT_HOST=localhost\n " in f .content_string
72
81
assert "KAEGER_SAMPLER_PARAM=0\n " in f .content_string
73
82
assert "KAEGER_SAMPLER_TYPE=const\n " in f .content_string
74
83
75
84
76
- def test_string2 (host ):
85
+ def test_env_readpath (host ):
77
86
f = host .file ("/etc/default/cortex-readpath" )
78
87
assert "KAEGER_SAMPLER_TYPE=probabilistic\n " in f .content_string
79
88
assert "KAEGER_SAMPLER_PARAM=0.1\n " in f .content_string
80
89
assert "KAEGER_SAMPLER_TYPE=probabilistic\n " in f .content_string
90
+
91
+
92
+ def test_env_compactor (host ):
93
+ f = host .file ("/etc/default/cortex-compactor" )
94
+ assert "=" not in f .content_string
0 commit comments