github.com/dnephin/dobi@v0.15.0/examples/init-named-volume/test.sh (about)

     1  #!/usr/bin/env bash
     2  # SUMMARY: Test initialize named volume example
     3  # LABELS:
     4  # REPEAT:
     5  # AUTHOR:
     6  set -eu -o pipefail
     7  
     8  cleanup() {
     9      echo "running cleanup"
    10      dobi autoclean
    11  }
    12  trap "cleanup" EXIT
    13  
    14  dobi populate
    15  
    16  echo "the volume contains the correct file"
    17  docker volume inspect example-init-volume-data
    18  docker run --rm \
    19      -v example-init-volume-data:/data \
    20      alpine:3.6 ls -1 data | \
    21      grep "newfile"
    22  
    23  dobi view | grep newfile