github.com/altipla-consulting/ravendb-go-client@v0.1.3/scripts/run_single_test.ps1 (about) 1 #!/usr/bin/env pwsh 2 # on mac install powershell: https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-macos?view=powershell-6 3 4 $Env:VERBOSE_LOG = "true" 5 $Env:LOG_HTTP_REQUEST_SUMMARY = "true" 6 $Env:LOG_FAILED_HTTP_REQUESTS = "true" 7 # logs output of raven server to stdout, helpful for failing tests 8 #export LOG_RAVEN_SERVER=true 9 $Env:LOG_ALL_REQUESTS = "true" 10 $Env:ENABLE_FAILING_TESTS = "false" 11 $Env:ENABLE_FLAKY_TESTS = "false" 12 $Env:ENABLE_NORTHWIND_TESTS = "true" 13 14 $enableCluster = $false # change to $true to enable cluster setup 15 16 if ($enableCluster) { 17 Write-Host "Cluster enabled" 18 # for running tests in a cluster, set to NODES_IN_CLUSTER to 3 19 # and KILL_SERVER_CHANCE to e.g. 10 (10%) and "SHUFFLE_CLUSTER_NODES" to true 20 $Env:NODES_IN_CLUSTER = "3" 21 $Env:KILL_SERVER_CHANCE = "0" 22 $Env:SHUFFLE_CLUSTER_NODES = "true" 23 $Env:LOG_TOPOLOGY = "true" 24 } else { 25 Write-Host "Cluster not enabled" 26 $Env:NODES_IN_CLUSTER = "0" 27 $Env:KILL_SERVER_CHANCE = "0" 28 $Env:SHUFFLE_CLUSTER_NODES = "false" 29 $Env:LOG_TOPOLOGY = "false" 30 } 31 32 go clean -testcache 33 34 #go test -tags for_tests -v -timeout 30s "-coverpkg=github.com/altipla-consulting/ravendb-go-client" -covermode=atomic "-coverprofile=coverage.txt" ./tests -run ^TestCachingOfDocumentInclude$ 35 36 go test -tags for_tests -v -race -timeout 60s ./tests -run ^TestLoad$ 37 38 #go test -tags for_tests -v -race -timeout 60s ./tests -run ^TestAggressiveCaching$ 39 40 if (0) { 41 # subscription worker tests 42 go test -tags for_tests -v -race -timeout 30s ./tests -run ^TestSubscriptionsBasic$ 43 go test -tags for_tests -v -race -timeout 30s ./tests -run ^TestSecuredSubscriptionsBasic$ 44 go test -tags for_tests -v -race -timeout 30s ./tests -run ^TestRevisionsSubscriptions$ 45 } 46 47 #go test -tags for_tests -v -race -timeout 60s ./tests -run ^TestAttachmentsRevisions$ 48 #go test -tags for_tests -v -race -timeout 60s ./tests -run ^TestRevisions$ 49 #go test -tags for_tests -v -race -timeout 60s ./tests -run ^TestAttachmentsSession$ 50