File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change
1
+ import os
1
2
import unittest
2
3
from unittest import mock
3
4
@@ -16,7 +17,9 @@ def test_default_config(self):
16
17
self .assertEqual ("localhost:11800" , spp .probe_config ["skywalking" ]["collector" ]["backend_service" ])
17
18
self .assertEqual ("spp" , spp .probe_config ["skywalking" ]["agent" ]["service_name" ])
18
19
19
- @mock .patch .dict ('os.environ' , {'SPP_PROBE_CONFIG_FILE' : 'probe_config/resources/base-config.yml' })
20
+ @mock .patch .dict ('os.environ' , {
21
+ 'SPP_PROBE_CONFIG_FILE' : '%s/resources/base-config.yml' % os .path .dirname (__file__ )
22
+ })
20
23
def test_config_from_env (self ):
21
24
spp = SourcePlusPlus ()
22
25
self .assertEqual ("spp-platform" , spp .probe_config ["spp" ]["platform_host" ])
@@ -26,4 +29,3 @@ def test_config_from_env(self):
26
29
self .assertEqual ("spp-platform:11800" , spp .probe_config ["skywalking" ]["collector" ]["backend_service" ])
27
30
self .assertEqual ("tutorial-jvm" , spp .probe_config ["skywalking" ]["agent" ]["service_name" ])
28
31
self .assertEqual ("WARN" , spp .probe_config ["skywalking" ]["logging" ]["level" ])
29
-
You can’t perform that action at this time.
0 commit comments