瀏覽代碼

Update versions of test dependencies (test_requirements.txt and test containers).

Dan Helfman 4 年之前
父節點
當前提交
ea6cd53067

+ 3 - 0
NEWS

@@ -1,3 +1,6 @@
+1.5.13.dev0
+ * Update versions of test dependencies (test_requirements.txt and test containers).
+
 1.5.12
  * Fix for previous release with incorrect version suffix in setup.py. No other changes.
 

+ 3 - 3
docs/Dockerfile

@@ -1,4 +1,4 @@
-FROM python:3.8.1-alpine3.11 as borgmatic
+FROM python:3.8-alpine3.12 as borgmatic
 
 COPY . /app
 RUN pip install --no-cache /app && generate-borgmatic-config && chmod +r /etc/borgmatic/config.yaml
@@ -7,7 +7,7 @@ RUN borgmatic --help > /command-line.txt \
            echo -e "\n--------------------------------------------------------------------------------\n" >> /command-line.txt \
            && borgmatic "$action" --help >> /command-line.txt; done
 
-FROM node:13.7.0-alpine as html
+FROM node:15.2.1-alpine as html
 
 ARG ENVIRONMENT=production
 
@@ -26,7 +26,7 @@ COPY . /source
 RUN NODE_ENV=${ENVIRONMENT} npx eleventy --input=/source/docs --output=/output/docs \
   && mv /output/docs/index.html /output/index.html
 
-FROM nginx:1.16.1-alpine
+FROM nginx:1.19.4-alpine
 
 COPY --from=html /output /usr/share/nginx/html
 COPY --from=borgmatic /etc/borgmatic/config.yaml /usr/share/nginx/html/docs/reference/config.yaml

+ 3 - 3
scripts/run-full-tests

@@ -10,9 +10,9 @@
 
 set -e
 
-python -m pip install --upgrade pip==20.0.2
-pip install tox==3.14.3
+python -m pip install --upgrade pip==20.2.4
+pip install tox==3.20.1
 export COVERAGE_FILE=/tmp/.coverage
+apk add --no-cache borgbackup postgresql-client mariadb-client py3-typed-ast
 tox --workdir /tmp/.tox
-apk add --no-cache borgbackup postgresql-client mariadb-client
 tox --workdir /tmp/.tox -e end-to-end

+ 1 - 1
setup.py

@@ -1,6 +1,6 @@
 from setuptools import find_packages, setup
 
-VERSION = '1.5.12'
+VERSION = '1.5.13.dev0'
 
 
 setup(

+ 23 - 20
test_requirements.txt

@@ -1,25 +1,28 @@
-appdirs==1.4.3
-atomicwrites==1.3.0
-attrs==19.3.0
-black==19.3b0; python_version >= '3.6'
-click==7.0
-colorama==0.4.1
-coverage==4.5.4
+appdirs==1.4.4
+atomicwrites==1.4.0
+attrs==20.3.0
+black==19.10b0; python_version >= '3.6'
+click==7.1.2
+colorama==0.4.4
+coverage==5.3
 docopt==0.6.2
-flake8==3.7.9
+flake8==3.8.4
 flexmock==0.10.4
-isort==4.3.21
+isort==5.6.4
 mccabe==0.6.1
-more-itertools==7.2.0
-pluggy==0.13.0
-py==1.8.0
-pycodestyle==2.5.0
-pyflakes==2.1.1
+more-itertools==8.6.0
+pluggy==0.13.1
+pathspec==0.8.1
+py==1.9.0
+pycodestyle==2.6.0
+pyflakes==2.2.0
 pykwalify==1.7.0
-pytest==5.2.2
-pytest-cov==2.8.1
-python-dateutil==2.8.0
-PyYAML==5.1.2
-requests==2.22.0
+pytest==6.1.2
+pytest-cov==2.10.1
+python-dateutil==2.8.1
+PyYAML==5.3.1
+regex==2020.11.13
+requests==2.25.0
 ruamel.yaml>0.15.0,<0.17.0
-toml==0.10.0
+toml==0.10.2
+typed-ast==1.4.1

+ 2 - 2
tests/end-to-end/docker-compose.yaml

@@ -1,7 +1,7 @@
 version: '3'
 services:
   postgresql:
-    image: postgres:12.2-alpine
+    image: postgres:13.1-alpine
     environment:
       POSTGRES_PASSWORD: test
       POSTGRES_DB: test
@@ -11,7 +11,7 @@ services:
       MYSQL_ROOT_PASSWORD: test
       MYSQL_DATABASE: test
   tests:
-    image: python:3.8-alpine3.11
+    image: python:3.8-alpine3.12
     volumes:
       - "../..:/app:ro"
     tmpfs:

+ 3 - 1
tests/unit/commands/test_borgmatic.py

@@ -447,7 +447,9 @@ def test_collect_configuration_run_summary_logs_outputs_merged_json_results():
     flexmock(module).should_receive('run_configuration').and_return(['foo', 'bar']).and_return(
         ['baz']
     )
-    flexmock(module.sys.stdout).should_receive('write').with_args('["foo", "bar", "baz"]').once()
+    stdout = flexmock()
+    stdout.should_receive('write').with_args('["foo", "bar", "baz"]').once()
+    flexmock(module.sys).stdout = stdout
     arguments = {}
 
     tuple(

+ 9 - 5
tests/unit/hooks/test_healthchecks.py

@@ -28,7 +28,9 @@ def test_forgetful_buffering_handler_emit_forgets_log_records_when_capacity_reac
 def test_format_buffered_logs_for_payload_flattens_log_buffer():
     handler = module.Forgetful_buffering_handler(byte_capacity=100, log_level=1)
     handler.buffer = ['foo\n', 'bar\n']
-    flexmock(module.logging).should_receive('getLogger').and_return(flexmock(handlers=[handler]))
+    logger = flexmock(handlers=[handler])
+    logger.should_receive('removeHandler')
+    flexmock(module.logging).should_receive('getLogger').and_return(logger)
 
     payload = module.format_buffered_logs_for_payload()
 
@@ -39,7 +41,9 @@ def test_format_buffered_logs_for_payload_inserts_truncation_indicator_when_logs
     handler = module.Forgetful_buffering_handler(byte_capacity=100, log_level=1)
     handler.buffer = ['foo\n', 'bar\n']
     handler.forgot = True
-    flexmock(module.logging).should_receive('getLogger').and_return(flexmock(handlers=[handler]))
+    logger = flexmock(handlers=[handler])
+    logger.should_receive('removeHandler')
+    flexmock(module.logging).should_receive('getLogger').and_return(logger)
 
     payload = module.format_buffered_logs_for_payload()
 
@@ -47,9 +51,9 @@ def test_format_buffered_logs_for_payload_inserts_truncation_indicator_when_logs
 
 
 def test_format_buffered_logs_for_payload_without_handler_produces_empty_payload():
-    flexmock(module.logging).should_receive('getLogger').and_return(
-        flexmock(handlers=[module.logging.Handler()])
-    )
+    logger = flexmock(handlers=[module.logging.Handler()])
+    logger.should_receive('removeHandler')
+    flexmock(module.logging).should_receive('getLogger').and_return(logger)
 
     payload = module.format_buffered_logs_for_payload()
 

+ 2 - 2
tox.ini

@@ -14,7 +14,7 @@ passenv = COVERAGE_FILE
 commands =
     pytest {posargs}
     py36,py37,py38: black --check .
-    isort --recursive --check-only --settings-path setup.cfg .
+    isort --check-only --settings-path setup.cfg .
     flake8 borgmatic tests
 
 [testenv:black]
@@ -34,4 +34,4 @@ commands =
 [testenv:isort]
 deps = {[testenv]deps}
 commands =
-    isort {posargs:--recursive} --settings-path setup.cfg .
+    isort --settings-path setup.cfg .