test(stage-schema): fault-inject fail-closed apply prerequisites
This commit is contained in:
1 parent
db3979d212
commit
0a156fd7b4
6 files changed
+198
-1
No files matched your search
@@ -124,6 +124,8 @@ def main():
|
||||
args = ['exec', STAGE, 'sh','-c', 'exec pg_dump -U "$POSTGRES_USER" -d "$POSTGRES_DB" --no-owner --no-acl -Fc' + (' --schema-only' if schema else '')]
|
||||
return d.run(args,timeout=180)
|
||||
backup = dump(a.mode == 'rehearse')
|
||||
if not backup:
|
||||
raise ValueError('Empty backup refused')
|
||||
backup_path = evidence / ('stage-schema.dump' if a.mode == 'rehearse' else 'stage-full.dump')
|
||||
fd = os.open(backup_path,os.O_WRONLY|os.O_CREAT|os.O_EXCL,0o600)
|
||||
with os.fdopen(fd,'wb') as f: f.write(backup)
|
||||
|
||||
Reference in new issue
Block a user