<commit_before>test_storage() {
  ensure_import_testimage

  # shellcheck disable=2039
  local LXD_STORAGE_DIR lxd_backend  

  lxd_backend=$(storage_backend "$LXD_DIR")
  LXD_STORAGE_DIR=$(mktemp -d -p "${TEST_DIR}" XXXXXXXXX)
  chmod +x "${LXD_STORAGE_DIR}"
  spawn_lxd "${LXD_STORAGE_DIR}" false

  # edit storage and pool description
  # shellcheck disable=2039
  local storage_pool storage_volume
  storage_pool="lxdtest-$(basename "${LXD_DIR}")-pool"
  storage_volume="${storage_pool}-vol"
  lxc storage create "$storage_pool" "$lxd_backend"
  lxc storage show "$storage_pool" | sed 's/^description:.*/description: foo/' | lxc storage edit "$storage_pool"
  lxc storage show "$storage_pool" | grep -q 'description: foo'

  lxc storage volume create "$storage_pool" "$storage_volume"
  if [ "$lxd_backend" != "dir" ] && [ "$lxd_backend" != "ceph" ]; then
    # Test resizing/applying quota to a storage volume.
    lxc storage volume set "$storage_pool" "$storage_volume" size 500MB<commit_msg>tests: resize to 200MB<commit_after>test_storage() {
  ensure_import_testimage

  # shellcheck disable=2039
  local LXD_STORAGE_DIR lxd_backend  

  lxd_backend=$(storage_backend "$LXD_DIR")
  LXD_STORAGE_DIR=$(mktemp -d -p "${TEST_DIR}" XXXXXXXXX)
  chmod +x "${LXD_STORAGE_DIR}"
  spawn_lxd "${LXD_STORAGE_DIR}" false

  # edit storage and pool description
  # shellcheck disable=2039
  local storage_pool storage_volume
  storage_pool="lxdtest-$(basename "${LXD_DIR}")-pool"
  storage_volume="${storage_pool}-vol"
  lxc storage create "$storage_pool" "$lxd_backend"
  lxc storage show "$storage_pool" | sed 's/^description:.*/description: foo/' | lxc storage edit "$storage_pool"
  lxc storage show "$storage_pool" | grep -q 'description: foo'

  lxc storage volume create "$storage_pool" "$storage_volume"
  if [ "$lxd_backend" != "dir" ] && [ "$lxd_backend" != "ceph" ]; then
    # Test resizing/applying quota to a storage volume.
    lxc storage volume set "$storage_pool" "$storage_volume" size 200MB
{'fraction_non_alphanumeric': 0.12805181863477827, 'fraction_numerical': 0.01245640259093174, 'mean_word_length': 5.275, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7283550', 'n_tokens_mistral': 720, 'n_tokens_neox': 691, 'n_words': 170}