MCPcopy Create free account
hub / github.com/wal-e/wal-e / test_wal_push_fetch

Function test_wal_push_fetch

tests/test_blackbox.py:21–34  ·  view source on GitHub ↗
(pg_xlog, tmpdir, config)

Source from the content-addressed store, hash-verified

19
20
21def test_wal_push_fetch(pg_xlog, tmpdir, config):
22 contents = 'abcdefghijlmnopqrstuvwxyz\n' * 10000
23 seg_name = '00000001' * 3
24 pg_xlog.touch(seg_name, '.ready')
25 pg_xlog.seg(seg_name).write(contents)
26 config.main('wal-push', 'pg_xlog/' + seg_name)
27
28 # Recall file and check for equality.
29 download_file = tmpdir.join('TEST-DOWNLOADED')
30 config.main('wal-fetch', '-p0', seg_name, str(download_file))
31 assert download_file.read() == contents
32
33 config.main('wal-prefetch', path.dirname(str(download_file)), seg_name)
34 assert tmpdir.join('.wal-e', 'prefetch', seg_name).check(file=1)
35
36
37def test_wal_push_parallel(pg_xlog, config, monkeypatch):

Callers

nothing calls this directly

Calls 6

touchMethod · 0.80
writeMethod · 0.80
segMethod · 0.80
mainMethod · 0.45
joinMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected