
Signed-off-by: Christoph Hellwig <hch@lst.de>

---
 tests/022     |   29 +++++++++++++++++++++++++++++
 tests/022.out |    4 ++++
 tests/group   |    1 +
 3 files changed, 34 insertions(+)
 create mode 100755 tests/022
 create mode 100644 tests/022.out

diff --git a/tests/022 b/tests/022
new file mode 100755
index 0000000..33d0707
--- /dev/null
+++ b/tests/022
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+# Test that writing to a cluster that only has gateways fails
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1        # failure is the default!
+
+# get standard environment, filters and checks
+. ./common.rc
+. ./common.filter
+
+_cleanup
+
+for i in `seq 0 2`; do
+    $SHEEP $STORE/$i -d -g -z $i -p 700$i -c $DRIVER
+done
+
+_wait_for_sheep "3"
+
+$COLLIE cluster format -c 3
+
+echo "creating a VDI should fail without data nodes available"
+$COLLIE vdi create test 100M
+
+status=0
diff --git a/tests/022.out b/tests/022.out
new file mode 100644
index 0000000..9d252af
--- /dev/null
+++ b/tests/022.out
@@ -0,0 +1,4 @@
+QA output created by 022
+using backend farm store
+creating a VDI should fail without data nodes available
+Failed to create VDI test: IO has halted as there are too few living nodes
diff --git a/tests/group b/tests/group
index f750d42..1737258 100644
--- a/tests/group
+++ b/tests/group
@@ -33,3 +33,4 @@
 019 auto quick cache
 020 auto quick cache
 021 auto quick cluster
+022 auto quick cluster
-- 
1.7.10.4



