IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

test_bootstrap.py 760B

il y a 4 ans
il y a 4 ans
il y a 4 ans
123456789101112131415161718
  1. import subprocess
  2. from focker.zfs import *
  3. import re
  4. import os
  5. def test_bootstrap():
  6. subprocess.check_output(['focker', 'image', 'remove', '--force', 'test-focker-bootstrap'])
  7. subprocess.check_output(['focker', 'bootstrap', '--dry-run', '--tags', 'test-focker-bootstrap'])
  8. name, sha256 = zfs_find('test-focker-bootstrap', focker_type='image')
  9. basename = os.path.basename(name)
  10. assert 7 <= len(basename) <= 64
  11. assert re.search('[a-f]', basename[:7])
  12. assert len(sha256) == 64
  13. assert basename == sha256[:len(basename)]
  14. assert zfs_exists_snapshot_sha256(sha256)
  15. assert zfs_parse_output(['zfs', 'get', '-H', 'rdonly', name])[0][2] == 'on'
  16. subprocess.check_output(['zfs', 'destroy', '-r', '-f', name])