Browse code

test for adding crazy branches

as found by dansmith's clever hack, if devstack lands a crazy
branch name in stackrc, we'd break the devstack gate. While it's
doubtful anyone would do this, add a basic sanity check.

Change-Id: Ib3b1881ed4fd520a1828ed073a7c8353e6f0a839

Sean Dague authored on 2014/03/07 03:45:42
Showing 1 changed files
... ...
@@ -27,3 +27,16 @@ fi
27 27
 echo "Running bash8..."
28 28
 
29 29
 ./tools/bash8.py -v $FILES
30
+
31
+
32
+# Test that no one is trying to land crazy refs as branches
33
+
34
+echo "Ensuring we don't have crazy refs"
35
+
36
+REFS=`grep BRANCH stackrc | grep -v -- '-master'`
37
+rc=$?
38
+if [[ $rc -eq 0 ]]; then
39
+    echo "Branch defaults must be master. Found:"
40
+    echo $REFS
41
+    exit 1
42
+fi