-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
85095: ui: reintroduce end-to-end UI tests with cypress r=laurenbarker,nathanstilwell,rickystewart,srosenberg a=sjbarag A recent commit [1] removed the stale, unused end-to-end tests. In their place, add newly-written tests that can run headlessly in TeamCity (via Docker) as a quick-failing health check and as a more exhaustive suite. [1] 3d171b2 (ui: remove unused end-to-end UI tests, 2022-07-25) Release note: None 85777: clusterversion,kvserver,server,security: remove 22.1 gates r=celiala a=celiala This commit removes the following 22.1 version gates: _(✅ denotes explicit LGTM)_ **8/8: initial PR version gates** - ✅ kvserver: ProbeRequest, - ✅ security,pgwire: SCRAMAuthentication, - ✅ server: UnsafeLossOfQuorumRecoveryRangeLog, - ✅ kvserver: AlterSystemProtectedTimestampAddColumn **8/10 Update: Additionally, these version gates to added to this commit** - ✅ backupccl: EnableProtectedTimestampsForTenant - ✅ DeleteCommentsWithDroppedIndexes - sql/catalog: RemoveIncompatibleDatabasePrivileges - ✅ kvserver: AddRaftAppliedIndexTermMigration - ✅ clusterversion: PostAddRaftAppliedIndexTermMigration - kvserver: DontProposeWriteTimestampForLeaseTransfers - ~✅ storage: EnablePebbleFormatVersionBlockProperties~ 8/12: TODO in future PR. - ✅ sql: MVCCIndexBackfiller - ✅ kvserver: LooselyCoupledRaftLogTruncation - ✅ sql: EnableDeclarativeSchemaChanger - ~✅ sql: RowLevelTTL~ 8/12: TODO in future PR. - kvserver: EnableNewStoreRebalancer - ~✅ sql: SuperRegions~ 8/12: TODO in future PR. - ~changefeedccl: EnableNewChangefeedOptions~ 8/12: TODO in future PR. - ✅ SpanCountTable - ✅ spanconfig: PreSeedSpanCountTable, SeedSpanCountTable The cleanup for these version gates was fairly straight-forward, using the guidance from [21.2 cleanup](#74270 (comment)): > For the most part, if the gates were just simple if !version.IsActive { return x } or something, I just removed the block, and even if it was a little more complicated, like args = [x]; if version { args = append(args, y) }; foo(args) I still tried to mostly inline it such that it looked natural (i.e. remove that append and make it args = [x, y]). 22.1 version gates requiring more nuanced removal will be done in separate PRs. Partially addresses #80663 Co-authored-by: Sean Barag <barag@cockroachlabs.com> Co-authored-by: Celia La <celia@cockroachlabs.com>
- Loading branch information
Showing
62 changed files
with
3,204 additions
and
569 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
build="$(dirname $(dirname $(dirname $(dirname $(dirname "${0}")))))" | ||
# for tc_prepare, tc_start_block, and friends | ||
source "$build/teamcity-support.sh" | ||
# for build_docker_image and run_tests | ||
source "$build/teamcity/cockroach/ci/tests/ui_e2e_test_impl.sh" | ||
|
||
tc_prepare | ||
|
||
tc_start_block "Load cockroachdb/cockroach-ci image" | ||
load_cockroach_docker_image | ||
tc_end_block "Load cockroachdb/cockroach-ci image" | ||
|
||
tc_start_block "Run Cypress health checks" | ||
cd $root/pkg/ui/workspaces/e2e-tests | ||
run_tests health | ||
tc_end_block "Run Cypress health checks" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
build="$(dirname $(dirname $(dirname $(dirname $(dirname "${0}")))))" | ||
# for tc_prepare, tc_start_block, and friends | ||
source "$build/teamcity-support.sh" | ||
# for build_docker_image and run_tests | ||
source "$build/teamcity/cockroach/ci/tests/ui_e2e_test_impl.sh" | ||
|
||
tc_prepare | ||
|
||
tc_start_block "Load cockroachdb/cockroach-ci image" | ||
load_cockroach_docker_image | ||
tc_end_block "Load cockroachdb/cockroach-ci image" | ||
|
||
tc_start_block "Run Cypress health checks" | ||
cd $root/pkg/ui/workspaces/e2e-tests | ||
run_tests health | ||
tc_end_block "Run Cypress health checks" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
function load_cockroach_docker_image() { | ||
docker load --input upstream_artifacts/cockroach-docker-image.tar.gz &> artifacts/docker-load.log || (cat artifacts/docker-load.log && false) | ||
rm artifacts/docker-load.log | ||
} | ||
|
||
function run_tests() { | ||
SPEC_ARG="" | ||
if [ "health" = "${1:-'EMPTY'}" ]; then | ||
SPEC_ARG="--spec 'cypress/e2e/health-check/**'" | ||
fi | ||
|
||
run docker compose run cypress -- $SPEC_ARG | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.