
import threading
from opsbro_test import *

from opsbro.gossip import gossiper


class TestGossip(OpsBroTest):
    def setUp(self):
        gossiper.init({}, threading.RLock(), '127.0.0.1', 6768, 'testing', 'super testing', 1, 'QQQQQQQQQQQQQQQQQQ', [], [], False, 'private', True)
    
    
    def test_gossip(self):
        pass


if __name__ == '__main__':
    unittest.main()


import threading
import tempfile

from opsbro_test import *
from opsbro.gossip import gossiper


class TestGossip(OpsBroTest):
    def setUp(self):
        # We need to have a valid path for data
        from opsbro.configurationmanager import configmgr
        configmgr.data_dir = tempfile.gettempdir()
        gossiper.init({}, threading.RLock(), '127.0.0.1', 6768, 'testing', 'super testing', 1, 'QQQQQQQQQQQQQQQQQQ', [], [], False, 'private', True)
    
    
    def test_gossip(self):
        pass


if __name__ == '__main__':
    unittest.main()

TEST gossip was crashing as the data directory was not exists for history data Enh: now directory creation is by default recursive
Fix: TEST gossip was crashing as the data directory was not exists for history data
Enh: now directory creation is by default recursive

  
  import threading
+ import tempfile
+ 
  from opsbro_test import *
- 
  from opsbro.gossip import gossiper
  
  
  class TestGossip(OpsBroTest):
      def setUp(self):
+         # We need to have a valid path for data
+         from opsbro.configurationmanager import configmgr
+         configmgr.data_dir = tempfile.gettempdir()
          gossiper.init({}, threading.RLock(), '127.0.0.1', 6768, 'testing', 'super testing', 1, 'QQQQQQQQQQQQQQQQQQ', [], [], False, 'private', True)
      
      
      def test_gossip(self):
          pass
  
  
  if __name__ == '__main__':
      unittest.main()
  
TEST gossip was crashing as the data directory was not exists for history data Enh: now directory creation is by default recursive
## Code Before:

import threading
from opsbro_test import *

from opsbro.gossip import gossiper


class TestGossip(OpsBroTest):
    def setUp(self):
        gossiper.init({}, threading.RLock(), '127.0.0.1', 6768, 'testing', 'super testing', 1, 'QQQQQQQQQQQQQQQQQQ', [], [], False, 'private', True)
    
    
    def test_gossip(self):
        pass


if __name__ == '__main__':
    unittest.main()

## Instruction:
TEST gossip was crashing as the data directory was not exists for history data Enh: now directory creation is by default recursive
## Code After:

import threading
import tempfile

from opsbro_test import *
from opsbro.gossip import gossiper


class TestGossip(OpsBroTest):
    def setUp(self):
        # We need to have a valid path for data
        from opsbro.configurationmanager import configmgr
        configmgr.data_dir = tempfile.gettempdir()
        gossiper.init({}, threading.RLock(), '127.0.0.1', 6768, 'testing', 'super testing', 1, 'QQQQQQQQQQQQQQQQQQ', [], [], False, 'private', True)
    
    
    def test_gossip(self):
        pass


if __name__ == '__main__':
    unittest.main()
