def test_get_pod_data_volumes_update_settings(self):
        volumes, _ = get_pod_data_volume(persistence_data=['data1'])
        assert len(volumes) == 1
        assert volumes[
            0].persistent_volume_claim.claim_name == 'test-claim-data-1'

        volumes, _ = get_pod_data_volume(persistence_data=['data2'])
        assert len(volumes) == 1
        assert volumes[0].host_path.path == '/root/data'

        volumes, _ = get_pod_data_volume(persistence_data=['data3'])
        self.assertEqual(len(volumes), 0)
 def test_get_pod_data_volumes_wrong_values(self):
     with self.assertRaises(VolumeNotFoundError):
         get_pod_data_volume(persistence_data=['foo'])
 def test_get_pod_data_volumes(self):
     volumes, _ = get_pod_data_volume(None)
     assert len(volumes) == 1
     assert volumes[
         0].persistent_volume_claim.claim_name == 'test-claim-data'