File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
netjsonconfig/backends/openvpn Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 292292 "description" : "Write operational status to file every n seconds; "
293293 "eg: \" /var/run/openvpn.status 10\" " ,
294294 "type" : "string" ,
295- "pattern" : "^((\\ S*) ([0-9]*)|)$" ,
295+ "pattern" : "^((\\ S*) ([0-9]*)|( \\ S*)| )$" ,
296296 "propertyOrder" : 35 ,
297297 },
298298 "status_version" : {
Original file line number Diff line number Diff line change 1+ import copy
12import tarfile
23import unittest
34
@@ -220,6 +221,12 @@ def test_no_status_file(self):
220221 self .assertNotIn ('status' , output )
221222 self .assertNotIn ('status-version' , output )
222223
224+ def test_status_file_no_seconds (self ):
225+ conf = copy .deepcopy (self ._simple_conf )
226+ conf ['openvpn' ][0 ]['status' ] = '/var/run/openvpn.status'
227+ c = OpenVpn (conf )
228+ self .assertIn ('status /var/run/openvpn.status' , c .render ())
229+
223230 def test_server_bridge (self ):
224231 c = OpenVpn ({
225232 "openvpn" : [{
You can’t perform that action at this time.
0 commit comments