Browse Source

run integration test with ssl

xoraes 11 years ago
parent
commit
bcbd8f962d
2 changed files with 2 additions and 27 deletions
  1. 2 7
      integration.sh
  2. 0 20
      wiki_test.go

+ 2 - 7
integration.sh

@@ -11,7 +11,7 @@ function run_tests() {
 	sed -i '/#MAX_HEAP_SIZE/c\MAX_HEAP_SIZE="256M"' ~/.ccm/repository/$version/conf/cassandra-env.sh
 	sed -i '/#HEAP_NEWSIZE/c\HEAP_NEWSIZE="100M"' ~/.ccm/repository/$version/conf/cassandra-env.sh
 
-	ccm updateconf 'concurrent_reads: 2' 'concurrent_writes: 2' 'rpc_server_type: sync' 'rpc_min_threads: 2' 'rpc_max_threads: 2' 'write_request_timeout_in_ms: 5000' 'read_request_timeout_in_ms: 5000'
+	ccm updateconf 'client_encryption_options.enabled: true' 'client_encryption_options.keystore: testdata/pki/.keystore' 'client_encryption_options.keystore_password: cassandra' 'client_encryption_options.require_client_auth: true' 'client_encryption_options.truststore: testdata/pki/.truststore' 'client_encryption_options.truststore_password: cassandra' 'concurrent_reads: 2' 'concurrent_writes: 2' 'rpc_server_type: sync' 'rpc_min_threads: 2' 'rpc_max_threads: 2' 'write_request_timeout_in_ms: 5000' 'read_request_timeout_in_ms: 5000'
 	ccm start
 	ccm status
 
@@ -20,7 +20,7 @@ function run_tests() {
 		proto=1
 	fi
 
-	go test -cover -v -proto=$proto -rf=3 -cluster=$(ccm liveset) -clusterSize=$clusterSize -autowait=2000ms ./... > results
+	go test -cover -v -runssl -proto=$proto -rf=3 -cluster=$(ccm liveset) -clusterSize=$clusterSize -autowait=2000ms ./... > results
 
 	cat results
 	cover=`cat results | grep coverage: | grep -o "[0-9]\{1,3\}" | head -n 1`
@@ -29,10 +29,5 @@ function run_tests() {
 		exit 1
 	fi
 	ccm clear
-
-	ccm updateconf 'client_encryption_options.enabled: true' 'client_encryption_options.keystore: testdata/pki/.keystore' 'client_encryption_options.keystore_password: cassandra' 'client_encryption_options.require_client_auth: true' 'client_encryption_options.truststore: testdata/pki/.truststore' 'client_encryption_options.truststore_password: cassandra'
-    ccm start
-    ccm status
-    go test -cover -v -run Wiki -runssl -proto=$proto -rf=3 -cluster=$(ccm liveset) -clusterSize=$clusterSize -autowait=2000ms ./...
 }
 run_tests $1

+ 0 - 20
wiki_test.go

@@ -13,26 +13,6 @@ import (
 	"time"
 )
 
-var cf func() *ClusterConfig
-
-func init() {
-	if true == *flagRunSslTest {
-		cf = createCluster
-		createCluster = createSslCluster
-	}
-}
-
-var createSslCluster = func() *ClusterConfig {
-	cluster := cf()
-	cluster.SslOpts = &SslOptions{
-		CertPath:               "testdata/pki/gocql.crt",
-		KeyPath:                "testdata/pki/gocql.key",
-		CaPath:                 "testdata/pki/ca.crt",
-		EnableHostVerification: false,
-	}
-	return cluster
-}
-
 type WikiPage struct {
 	Title       string
 	RevId       UUID