Переглянути джерело

Merge pull request #199 from phillipCouto/support_1.2

Added 1.2.x to intergration testing.
Ben Hood 11 роки тому
батько
коміт
7979a612ad
2 змінених файлів з 9 додано та 3 видалено
  1. 7 2
      integration.sh
  2. 2 1
      wiki_test.go

+ 7 - 2
integration.sh

@@ -6,7 +6,7 @@ PID_FILE=cassandra.pid
 STARTUP_LOG=startup.log
 ARCHIVE_BASE_URL=http://archive.apache.org/dist/cassandra
 
-for v in 2.0.6 2.0.7
+for v in 1.2.18 2.0.9
 do
 	TARBALL=apache-cassandra-$v-bin.tar.gz
 	CASSANDRA_DIR=apache-cassandra-$v
@@ -37,7 +37,12 @@ do
 
 	echo "Cassandra ${v} running (PID ${PID}), about to run test suite ...."
 
-	go test -v ./...
+	if [[ $v == 1.2.* ]]
+		then
+		go test -v ./... -proto 1
+	else
+		go test -v ./...
+	fi
 
 	echo "Test suite passed against Cassandra ${v}, killing server instance (PID ${PID})"
 	

+ 2 - 1
wiki_test.go

@@ -54,7 +54,8 @@ type WikiTest struct {
 }
 
 func (w *WikiTest) CreateSchema() {
-	if err := w.session.Query(`DROP TABLE IF EXISTS wiki_page`).Exec(); err != nil {
+
+	if err := w.session.Query(`DROP TABLE wiki_page`).Exec(); err != nil && err.Error() != "unconfigured columnfamily wiki_page" {
 		w.tb.Fatal("CreateSchema:", err)
 	}
 	if err := w.session.Query(`CREATE TABLE wiki_page (