Пример #1
0
 def test_pillar_reset(self):
     PillarManager.set('ceph-salt:test', 'some text')
     val = PillarManager.get('ceph-salt:test')
     self.assertEqual(val, 'some text')
     PillarManager.reset('ceph-salt:test')
     val = PillarManager.get('ceph-salt:test')
     self.assertIsNone(val)
Пример #2
0
 def test_pillar_set(self):
     PillarManager.set('ceph-salt:test:enabled', True)
     file_path = os.path.join(SaltClient.pillar_fs_path(),
                              PillarManager.PILLAR_FILE)
     self.assertYamlEqual(file_path,
                          {'ceph-salt': {
                              'test': {
                                  'enabled': True
                              }
                          }})