Skip to content

Commit

Permalink
Testing...
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <mattalord@gmail.com>
  • Loading branch information
mattlord committed Feb 4, 2025
1 parent efc5db4 commit 02af9e1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 118 deletions.
102 changes: 0 additions & 102 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,6 @@ env:
# Mount the docker.sock as to the docker container, so that we are able to
# run docker build command and kind is spawned as a sibling container.
steps:
- name: "Upgrade Test"
command:
- apk add g++ make bash gcompat curl mysql mysql-client libc6-compat
- wget https://golang.org/dl/$GO_VERSION_FILE
- tar -C /usr/local -xzf $GO_VERSION_FILE
- export PATH=$PATH:/usr/local/go/bin:/bin
- rm $GO_VERSION_FILE
- ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2
- make upgrade-test
concurrency: 1
concurrency_group: 'vtop/upgrade-downgrade-test'
timeout_in_minutes: 60
plugins:
- docker#v3.12.0:
image: "docker:latest"
propagate-environment: true
propagate-uid-gid: true
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"

- name: "Backup Restore Test"
command:
- apk add g++ make bash gcompat curl mysql mysql-client libc6-compat
Expand All @@ -35,94 +15,12 @@ steps:
- export PATH=$PATH:/usr/local/go/bin:/bin
- rm $GO_VERSION_FILE
- ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2
- make backup-restore-test
concurrency: 1
concurrency_group: 'vtop/backup-restore-test'
timeout_in_minutes: 60
plugins:
- docker#v3.12.0:
image: "docker:latest"
propagate-environment: true
propagate-uid-gid: true
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"

- name: "Backup Schedule Test"
command:
- apk add g++ make bash gcompat curl mysql mysql-client libc6-compat
- wget https://golang.org/dl/$GO_VERSION_FILE
- tar -C /usr/local -xzf $GO_VERSION_FILE
- export PATH=$PATH:/usr/local/go/bin:/bin
- rm $GO_VERSION_FILE
- ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2
- make backup-schedule-test
concurrency: 1
concurrency_group: 'vtop/backup-schedule-test'
timeout_in_minutes: 60
plugins:
- docker#v3.12.0:
image: "docker:latest"
propagate-environment: true
propagate-uid-gid: true
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"

- name: "VTOrc and VTAdmin Test"
command:
- apk add g++ make bash gcompat curl mysql mysql-client libc6-compat chromium
- wget https://golang.org/dl/$GO_VERSION_FILE
- tar -C /usr/local -xzf $GO_VERSION_FILE
- export PATH=$PATH:/usr/local/go/bin:/bin
- rm $GO_VERSION_FILE
- ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2
- make vtorc-vtadmin-test
concurrency: 1
concurrency_group: 'vtop/vtorc-vtadmin-test'
timeout_in_minutes: 60
plugins:
- docker#v3.12.0:
image: "docker:latest"
propagate-environment: true
propagate-uid-gid: true
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"

- name: "Unmanaged Tablet Test"
command:
- apk add g++ make bash gcompat curl mysql mysql-client libc6-compat chromium coreutils
- wget https://golang.org/dl/$GO_VERSION_FILE
- tar -C /usr/local -xzf $GO_VERSION_FILE
- export PATH=$PATH:/usr/local/go/bin:/bin
- rm $GO_VERSION_FILE
- ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2
- make unmanaged-tablet-test
concurrency: 1
concurrency_group: 'vtop/unmanaged-tablet-test'
timeout_in_minutes: 60
plugins:
- docker#v3.12.0:
image: "docker:latest"
propagate-environment: true
propagate-uid-gid: true
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"

- name: "HPA Test"
command:
- apk add g++ make bash gcompat curl mysql mysql-client libc6-compat
- wget https://golang.org/dl/$GO_VERSION_FILE
- tar -C /usr/local -xzf $GO_VERSION_FILE
- export PATH=$PATH:/usr/local/go/bin:/bin
- rm $GO_VERSION_FILE
- ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2
- make hpa-test
concurrency: 1
concurrency_group: 'vtop/hpa-test'
timeout_in_minutes: 60
plugins:
- docker#v3.12.0:
image: "docker:latest"
propagate-environment: true
propagate-uid-gid: true
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
2 changes: 1 addition & 1 deletion test/endtoend/backup_restore_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function setupKindConfig() {
# Test setup
STARTING_DIR="$PWD"
echo "Make temporary directory for the test"
mkdir -p -m 777 ./vtdataroot/backup
mkdir -p -m 770 ./vtdataroot/backup
echo "Building the docker image"
docker build -f build/Dockerfile.release -t vitess-operator-pr:latest .
echo "Setting up the kind config"
Expand Down
29 changes: 14 additions & 15 deletions test/endtoend/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,31 +91,30 @@ function takeBackup() {
# issue the backupShard command to vtctldclient
vtctldclient BackupShard "$keyspaceShard"

for i in {1..600} ; do
out=$(kubectl get vtb --no-headers | wc -l)
echo "$out" | grep "$finalBackupCount" > /dev/null 2>&1
if [[ $? -eq 0 ]]; then
echo "Backup created"
return 0
fi
sleep 3
done
echo -e "ERROR: Backup not created - $out. $backupCount backups expected."
exit 1
if [[ $? -ne 0 ]]; then
echo "Backup failed"
exit 1
fi
chown -R 1001:1001 /vt/backups
echo "Backup completed"
}

function verifyListBackupsOutput() {
backupCount=$(kubectl get vtb --no-headers | wc -l)
for i in {1..600} ; do
out=$(vtctldclient LegacyVtctlCommand -- ListBackups "$keyspaceShard" | wc -l)
echo "UID info: $(id)"
echo "GetBackups output: $(vtctldclient GetBackups "$keyspaceShard")"
for i in {1..10} ; do
backupCount=$(kubectl get vtb --no-headers | wc -l)
echo "Kubectl backup count is ${backupCount}"
out=$(vtctldclient GetBackups "$keyspaceShard" | wc -l)
echo "vtctldclient backup count is ${out}"
echo "$out" | grep "$backupCount" > /dev/null 2>&1
if [[ $? -eq 0 ]]; then
echo "ListBackupsOutputCorrect"
return 0
fi
sleep 3
done
echo -e "ERROR: ListBackups output not correct - $out. $backupCount backups expected."
echo -e "ERROR: GetBackups output not correct - $out. $backupCount backups expected."
exit 1
}

Expand Down

0 comments on commit 02af9e1

Please sign in to comment.