The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/pylxd/pull/233

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
The whole test suite was broken lately for three reasons:

1. Version in `setp.cfg` was out of sync with git tagging, making `pbr`
   scream.
2. `mock_services` is outdated and unmaintained and doesn't work with
   newer versions of `requests-mock`.
3. The newly added `description` property wasn't properly added in
   mocked LXD.

I've fixed those two problems by updating the `setup.cfg` version,
pinning `requests-mock` to the last version to work and adding a
`description` field to the mocks.

On my machine, all tox tests pass now.
From 589dc00fadc8e4dbb01071c1d264f2f6f71cb211 Mon Sep 17 00:00:00 2001
From: Virgil Dupras <[email protected]>
Date: Wed, 31 May 2017 21:15:54 -0400
Subject: [PATCH] Fix broken CI testing

The whole test suite was broken lately for three reasons:

1. Version in `setp.cfg` was out of sync with git tagging, making `pbr`
   scream.
2. `mock_services` is outdated and unmaintained and doesn't work with
   newer versions of `requests-mock`.
3. The newly added `description` property wasn't properly added in
   mocked LXD.

I've fixed those two problems by updating the `setup.cfg` version,
pinning `requests-mock` to the last version to work and adding a
`description` field to the mocks.

On my machine, all tox tests pass now.
---
 pylxd/tests/mock_lxd.py | 1 +
 setup.cfg               | 2 +-
 test-requirements.txt   | 3 +++
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/pylxd/tests/mock_lxd.py b/pylxd/tests/mock_lxd.py
index 10a3273..e5dc19a 100644
--- a/pylxd/tests/mock_lxd.py
+++ b/pylxd/tests/mock_lxd.py
@@ -185,6 +185,7 @@ def profile_GET(request, context):
                 },
                 'created_at': "1983-06-16T00:00:00-00:00",
                 'last_used_at': "1983-06-16T00:00:00-00:00",
+                'description': "Some description",
                 'devices': {
                     'root': {
                         'path': "/",
diff --git a/setup.cfg b/setup.cfg
index 7abd5b2..62c72db 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,7 +1,7 @@
 [metadata]
 name = pylxd
 summary = python library for lxd
-version = 2.2.2
+version = 2.2.4
 description-file =
     README.rst
 author = Paul Hummer
diff --git a/test-requirements.txt b/test-requirements.txt
index ae59d0c..9d3df30 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -4,3 +4,6 @@ mock>=1.3.0
 flake8>=2.5.0
 coverage>=4.1
 mock-services>=0.3
+# mock-services is old and unmaintained. Doesn't work with newer versions of
+# requests-mock. Thus, we have to pin it down.
+requests-mock<1.2
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to