Skip to content

Commit

Permalink
Add the ability to run upgrade test (#21)
Browse files Browse the repository at this point in the history
Upgrade test runs after regression test. It is need to generate tar-archive with previous
versions of diskquota. Path to archive is set in command to run Docker:
"<PATH_TO_ARCHIVE_WITH_OLD_VERSIONS>".

Before run tests it is needed to run build step:
```
docker run --rm -it -e DISKQUOTA_OS=rhel7 \
       -v /tmp/diskquota_artifacts:/home/gpadmin/diskquota_artifacts \
       -v <PATH_TO_DISKQUOTA_SRC>:/home/gpadmin/diskquota_src \
       -v <PATH_TO_CMAKE_INSTALL_SCRIPT>:/home/gpadmin/bin_cmake/cmake-3.20.0-linux-x86_64.sh \
       hub.adsw.io/library/gpdb6_regress:latest diskquota_src/concourse/scripts/entry.sh build
```

Full command to run all tests in Docker:
```
docker run --rm -it --sysctl 'kernel.sem=500 1024000 200 4096' \
       -v /tmp/diskquota_artifacts:/home/gpadmin/bin_diskquota \
       -v <PATH_TO_DISKQUOTA_SRC>:/home/gpadmin/diskquota_src \
       -v <PATH_TO_CMAKE_INSTALL_SCRIPT>:/home/gpadmin/bin_cmake/cmake-3.20.0-linux-x86_64.sh \
       -v <PATH_TO_ARCHIVE_WITH_OLD_VERSIONS>:/home/gpadmin/diskquota_old_versions.tar \
       hub.adsw.io/library/gpdb6_regress:latest diskquota_src/concourse/scripts/entry.sh test
```
  • Loading branch information
red1452 committed Oct 3, 2023
1 parent fe2c57f commit b1d7fad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arenadata/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ docker run --rm -it --sysctl 'kernel.sem=500 1024000 200 4096' \
-v /tmp/diskquota_artifacts:/home/gpadmin/bin_diskquota \
-v <PATH_TO_DISKQUOTA_SRC>:/home/gpadmin/diskquota_src \
-v <PATH_TO_CMAKE_INSTALL_SCRIPT>:/home/gpadmin/bin_cmake/cmake-3.20.0-linux-x86_64.sh \
-v <PATH_TO_ARCHIVE_WITH_OLD_VERSIONS>://home/gpadmin/diskquota_old_versions.tar \
-v <PATH_TO_ARCHIVE_WITH_OLD_VERSIONS>:/home/gpadmin/diskquota_old_versions.tar \
hub.adsw.io/library/gpdb6_regress:latest diskquota_src/concourse/scripts/entry.sh test
```
2 changes: 1 addition & 1 deletion src/diskquota.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ disk_quota_worker_main(Datum main_arg)
int major = -1, minor = -1;
int has_error = worker_spi_get_extension_version(&major, &minor) != 0;

if (major == DISKQUOTA_MAJOR_VERSION) break;
if (major == DISKQUOTA_MAJOR_VERSION && minor == DISKQUOTA_MINOR_VERSION) break;
#if GP_VERSION_NUM < 70000
/* MemoryAccount has been removed on gpdb7 */
MemoryAccounting_Reset();
Expand Down

0 comments on commit b1d7fad

Please sign in to comment.