github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/cmd/roachtest/acceptance.go (about) 1 // Copyright 2018 The Cockroach Authors. 2 // 3 // Use of this software is governed by the Business Source License 4 // included in the file licenses/BSL.txt. 5 // 6 // As of the Change Date specified in that file, in accordance with 7 // the Business Source License, use of this software will be governed 8 // by the Apache License, Version 2.0, included in the file 9 // licenses/APL.txt. 10 11 package main 12 13 import ( 14 "context" 15 "time" 16 ) 17 18 func registerAcceptance(r *testRegistry) { 19 testCases := []struct { 20 name string 21 fn func(ctx context.Context, t *test, c *cluster) 22 skip string 23 minVersion string 24 timeout time.Duration 25 }{ 26 // Sorted. Please keep it that way. 27 {name: "bank/cluster-recovery", fn: runBankClusterRecovery}, 28 {name: "bank/node-restart", fn: runBankNodeRestart}, 29 { 30 name: "bank/zerosum-splits", fn: runBankNodeZeroSum, 31 skip: "https://github.com/cockroachdb/cockroach/issues/33683 (runs into " + 32 " various errors during its rebalances, see isExpectedRelocateError)", 33 }, 34 // {"bank/zerosum-restart", runBankZeroSumRestart}, 35 {name: "build-info", fn: runBuildInfo}, 36 {name: "build-analyze", fn: runBuildAnalyze}, 37 {name: "cli/node-status", fn: runCLINodeStatus}, 38 {name: "decommission", fn: runDecommissionAcceptance}, 39 {name: "cluster-init", fn: runClusterInit}, 40 {name: "event-log", fn: runEventLog}, 41 {name: "gossip/peerings", fn: runGossipPeerings}, 42 {name: "gossip/restart", fn: runGossipRestart}, 43 {name: "gossip/restart-node-one", fn: runGossipRestartNodeOne}, 44 {name: "gossip/locality-address", fn: runCheckLocalityIPAddress}, 45 {name: "rapid-restart", fn: runRapidRestart}, 46 { 47 name: "many-splits", fn: runManySplits, 48 minVersion: "v19.2.0", // SQL syntax unsupported on 19.1.x 49 }, 50 {name: "status-server", fn: runStatusServer}, 51 { 52 name: "version-upgrade", 53 fn: func(ctx context.Context, t *test, c *cluster) { 54 runVersionUpgrade(ctx, t, c, r.buildVersion) 55 }, 56 // This test doesn't like running on old versions because it upgrades to 57 // the latest released version and then it tries to "head", where head is 58 // the cockroach binary built from the branch on which the test is 59 // running. If that branch corresponds to an older release, then upgrading 60 // to head after 19.2 fails. 61 minVersion: "v19.2.0", 62 timeout: 30 * time.Minute}, 63 } 64 tags := []string{"default", "quick"} 65 const numNodes = 4 66 specTemplate := testSpec{ 67 // NB: teamcity-post-failures.py relies on the acceptance tests 68 // being named acceptance/<testname> and will avoid posting a 69 // blank issue for the "acceptance" parent test. Make sure to 70 // teach that script (if it's still used at that point) should 71 // this naming scheme ever change (or issues such as #33519) 72 // will be posted. 73 Name: "acceptance", 74 Owner: OwnerKV, 75 Timeout: 10 * time.Minute, 76 Tags: tags, 77 Cluster: makeClusterSpec(numNodes), 78 } 79 80 for _, tc := range testCases { 81 tc := tc // copy for closure 82 spec := specTemplate 83 spec.Skip = tc.skip 84 spec.Name = specTemplate.Name + "/" + tc.name 85 spec.MinVersion = tc.minVersion 86 if tc.timeout != 0 { 87 spec.Timeout = tc.timeout 88 } 89 spec.Run = func(ctx context.Context, t *test, c *cluster) { 90 tc.fn(ctx, t, c) 91 } 92 r.Add(spec) 93 } 94 }