From 6b8a42b0439bd81bbb8359c256538daf53622733 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Thu, 2 Dec 2021 09:34:29 -0500 Subject: [PATCH 1/2] Make the test more robust. --- newsfragments/3850.minor | 0 src/allmydata/test/test_storage_http.py | 8 ++++++++ 2 files changed, 8 insertions(+) create mode 100644 newsfragments/3850.minor diff --git a/newsfragments/3850.minor b/newsfragments/3850.minor new file mode 100644 index 000000000..e69de29bb diff --git a/src/allmydata/test/test_storage_http.py b/src/allmydata/test/test_storage_http.py index 442e154a0..e30eb24c7 100644 --- a/src/allmydata/test/test_storage_http.py +++ b/src/allmydata/test/test_storage_http.py @@ -63,7 +63,15 @@ class HTTPTests(TestCase): def test_version(self): """ The client can return the version. + + We ignore available disk space since that might change across calls. """ version = yield self.client.get_version() + version[b"http://allmydata.org/tahoe/protocols/storage/v1"].pop( + b"available-space" + ) expected_version = self.storage_server.remote_get_version() + expected_version[b"http://allmydata.org/tahoe/protocols/storage/v1"].pop( + b"available-space" + ) self.assertEqual(version, expected_version) From 314b20291442bd485b9919081611efb9c145c277 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Fri, 3 Dec 2021 12:58:12 -0500 Subject: [PATCH 2/2] Ignore another field which can change. --- src/allmydata/test/test_storage_http.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/allmydata/test/test_storage_http.py b/src/allmydata/test/test_storage_http.py index e30eb24c7..23a3e3ea6 100644 --- a/src/allmydata/test/test_storage_http.py +++ b/src/allmydata/test/test_storage_http.py @@ -64,14 +64,21 @@ class HTTPTests(TestCase): """ The client can return the version. - We ignore available disk space since that might change across calls. + We ignore available disk space and max immutable share size, since that + might change across calls. """ version = yield self.client.get_version() version[b"http://allmydata.org/tahoe/protocols/storage/v1"].pop( b"available-space" ) + version[b"http://allmydata.org/tahoe/protocols/storage/v1"].pop( + b"maximum-immutable-share-size" + ) expected_version = self.storage_server.remote_get_version() expected_version[b"http://allmydata.org/tahoe/protocols/storage/v1"].pop( b"available-space" ) + expected_version[b"http://allmydata.org/tahoe/protocols/storage/v1"].pop( + b"maximum-immutable-share-size" + ) self.assertEqual(version, expected_version)