From 0d2d440ec6d8f6debaced6beff0b3a52f35f31ef Mon Sep 17 00:00:00 2001 From: Lukas Garberg Date: Mon, 16 Oct 2023 23:50:50 +0200 Subject: [PATCH 1/2] ci: Enable upgrade tests agein The upgrade tests were disabled as we couldn't install both Python 2 and Python 3 versions on the test runner image. Now that the Python 3 version of NIPAP is released, the upgrade testa can be re-enabled. --- .github/workflows/ci.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70888156e..7a02912e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,8 +17,7 @@ jobs: strategy: matrix: install: [ pip, apt ] - # Upgrade tests temporary disabled as Python 2 version cannot be installed on Ubuntu 20.04 - upgrade: [ false ] + upgrade: [ true, false ] exclude: - install: pip upgrade: true @@ -102,10 +101,6 @@ jobs: run: | # Install NIPAP packages from official repo sudo apt install -qq nipapd nipap-www nipap-cli - # bump version so that we know we are upgrading beyond what is installed - (echo -e 'Version 9999.9.9\n------------------\n * Test version for automatic upgrade test'; cat NEWS) > NEWS2 - mv NEWS2 NEWS - make bumpversion # populate answers to nipapd package install questions and reconfigure echo 'set nipapd/database_host localhost' | sudo debconf-communicate echo 'set nipapd/local_db_autoconf true' | sudo debconf-communicate @@ -116,9 +111,13 @@ jobs: sudo sed -e "s/#ssl_port.\+$/ssl_port = 1338/" -e "s/#ssl_cert_file.\+$/ssl_cert_file = \/tmp\/ca\/test.bundle.crt/" -e "s/#ssl_key_file.\+$/ssl_key_file = \/tmp\/ca\/test.key/" -i /etc/nipap/nipap.conf # create local user for unittest and restart sudo nipap-passwd add -u unittest -p gottatest -f /etc/nipap/local_auth.db -n unittest - sudo /etc/init.d/nipapd restart - # if upgrade, add some data to the database that we can verify later + sudo systemctl restart nipapd.service + # add some data to the database that we can verify later nosetests tests/upgrade-before.py + # bump version so that we know we are upgrading beyond what is installed + (echo -e 'Version 9999.9.9\n------------------\n * Test version for automatic upgrade test'; cat NEWS) > NEWS2 + mv NEWS2 NEWS + make bumpversion - name: "Build and install Debian packages" if: ${{ matrix.install == 'apt' }} From c2bd7321f7c59accc194233e4f09b2f05b443414 Mon Sep 17 00:00:00 2001 From: Lukas Garberg Date: Mon, 23 Oct 2023 08:33:09 +0200 Subject: [PATCH 2/2] ci: Run Python 3 version of nosetests --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a02912e5..87c19c43a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -113,7 +113,7 @@ jobs: sudo nipap-passwd add -u unittest -p gottatest -f /etc/nipap/local_auth.db -n unittest sudo systemctl restart nipapd.service # add some data to the database that we can verify later - nosetests tests/upgrade-before.py + nosetests3 tests/upgrade-before.py # bump version so that we know we are upgrading beyond what is installed (echo -e 'Version 9999.9.9\n------------------\n * Test version for automatic upgrade test'; cat NEWS) > NEWS2 mv NEWS2 NEWS