def test_truncate_and_write(self): client = KubernetesClient() fs = KubeFileSystem(client) pod = client.get_pods()[0] path = '/default/pod/%s/yaml' % pod fs.truncate(path, 0) fs.write(path, 'test', 0) fs.write(path, 'write', 4) fs.sync(path, dry_run=True) data = fs.read(path, 1000, 0) assert_that(data, is_(b'testwrite'))
def test_truncate_and_write(self): client = KubernetesClient() fs = KubeFileSystem(client) pod = client.get_pods()[0] path = '/default/pod/%s/yaml' % pod fs.truncate(path, 0) fs.write(path, 'test', 0) fs.write(path, 'write', 4) fs.sync(path, dry_run=True) data = fs.read(path, 1000, 0) assert_that(data, is_('testwrite'))