Commit 0e0e8d19 authored by Łukasz Nowak's avatar Łukasz Nowak Committed by Łukasz Nowak

Fix connection-parameter-hash

Fixed slapos.core stabilises connection_dict during publish, so it is able
to calculate connection-parameter-hash the same way on client and on server, this
having same results when it is expected to have them.

Tasks:

 - [x] release `slapos.core` with nexedi/slapos.core!131 and use the version here

/reviewed-on nexedi/slapos!625
parent 6743fbd1
...@@ -600,7 +600,7 @@ class TestMasterRequest(HttpFrontendTestCase, TestDataMixin): ...@@ -600,7 +600,7 @@ class TestMasterRequest(HttpFrontendTestCase, TestDataMixin):
self.assertRejectedSlavePromiseWithPop(parameter_dict) self.assertRejectedSlavePromiseWithPop(parameter_dict)
self.assertEqual( self.assertEqual(
{ {
'monitor-base-url': None, 'monitor-base-url': 'None',
'domain': 'None', 'domain': 'None',
'accepted-slave-amount': '0', 'accepted-slave-amount': '0',
'rejected-slave-amount': '0', 'rejected-slave-amount': '0',
...@@ -633,7 +633,7 @@ class TestMasterRequestDomain(HttpFrontendTestCase, TestDataMixin): ...@@ -633,7 +633,7 @@ class TestMasterRequestDomain(HttpFrontendTestCase, TestDataMixin):
self.assertEqual( self.assertEqual(
{ {
'monitor-base-url': None, 'monitor-base-url': 'None',
'domain': 'example.com', 'domain': 'example.com',
'accepted-slave-amount': '0', 'accepted-slave-amount': '0',
'rejected-slave-amount': '0', 'rejected-slave-amount': '0',
...@@ -1405,7 +1405,7 @@ http://apachecustomhttpsaccepted.example.com:%%(http_port)s { ...@@ -1405,7 +1405,7 @@ http://apachecustomhttpsaccepted.example.com:%%(http_port)s {
self.assertRejectedSlavePromiseWithPop(parameter_dict) self.assertRejectedSlavePromiseWithPop(parameter_dict)
expected_parameter_dict = { expected_parameter_dict = {
'monitor-base-url': None, 'monitor-base-url': 'None',
'domain': 'example.com', 'domain': 'example.com',
'accepted-slave-amount': '52', 'accepted-slave-amount': '52',
'rejected-slave-amount': '5', 'rejected-slave-amount': '5',
...@@ -4174,7 +4174,7 @@ class TestRe6stVerificationUrlDefaultSlave(SlaveHttpFrontendTestCase, ...@@ -4174,7 +4174,7 @@ class TestRe6stVerificationUrlDefaultSlave(SlaveHttpFrontendTestCase,
'url': 'http://default.None', 'url': 'http://default.None',
'site_url': 'http://default.None', 'site_url': 'http://default.None',
'secure_access': 'https://default.None', 'secure_access': 'https://default.None',
'public-ipv4': None, 'public-ipv4': 'None',
}, },
parameter_dict parameter_dict
) )
...@@ -4228,7 +4228,7 @@ class TestRe6stVerificationUrlSlave(SlaveHttpFrontendTestCase, ...@@ -4228,7 +4228,7 @@ class TestRe6stVerificationUrlSlave(SlaveHttpFrontendTestCase,
'url': 'http://default.None', 'url': 'http://default.None',
'site_url': 'http://default.None', 'site_url': 'http://default.None',
'secure_access': 'https://default.None', 'secure_access': 'https://default.None',
'public-ipv4': None, 'public-ipv4': 'None',
}, },
parameter_dict parameter_dict
) )
...@@ -4285,7 +4285,7 @@ class TestMalformedBackenUrlSlave(SlaveHttpFrontendTestCase, ...@@ -4285,7 +4285,7 @@ class TestMalformedBackenUrlSlave(SlaveHttpFrontendTestCase,
self.assertRejectedSlavePromiseWithPop(parameter_dict) self.assertRejectedSlavePromiseWithPop(parameter_dict)
expected_parameter_dict = { expected_parameter_dict = {
'monitor-base-url': None, 'monitor-base-url': 'None',
'domain': 'example.com', 'domain': 'example.com',
'accepted-slave-amount': '1', 'accepted-slave-amount': '1',
'rejected-slave-amount': '2', 'rejected-slave-amount': '2',
...@@ -4379,7 +4379,7 @@ class TestDefaultMonitorHttpdPort(SlaveHttpFrontendTestCase, TestDataMixin): ...@@ -4379,7 +4379,7 @@ class TestDefaultMonitorHttpdPort(SlaveHttpFrontendTestCase, TestDataMixin):
{ {
'domain': 'test.None', 'replication_number': '1', 'domain': 'test.None', 'replication_number': '1',
'url': 'http://test.None', 'site_url': 'http://test.None', 'url': 'http://test.None', 'site_url': 'http://test.None',
'secure_access': 'https://test.None', 'public-ipv4': None}, 'secure_access': 'https://test.None', 'public-ipv4': 'None'},
parameter_dict parameter_dict
) )
master_monitor_conf = open(os.path.join( master_monitor_conf = open(os.path.join(
...@@ -4562,7 +4562,7 @@ class TestSlaveBadParameters(SlaveHttpFrontendTestCase, TestDataMixin): ...@@ -4562,7 +4562,7 @@ class TestSlaveBadParameters(SlaveHttpFrontendTestCase, TestDataMixin):
self.assertRejectedSlavePromiseWithPop(parameter_dict) self.assertRejectedSlavePromiseWithPop(parameter_dict)
expected_parameter_dict = { expected_parameter_dict = {
'monitor-base-url': None, 'monitor-base-url': 'None',
'domain': 'example.com', 'domain': 'example.com',
'accepted-slave-amount': '8', 'accepted-slave-amount': '8',
'rejected-slave-amount': '3', 'rejected-slave-amount': '3',
...@@ -4944,7 +4944,7 @@ class TestDuplicateSiteKeyProtection(SlaveHttpFrontendTestCase, TestDataMixin): ...@@ -4944,7 +4944,7 @@ class TestDuplicateSiteKeyProtection(SlaveHttpFrontendTestCase, TestDataMixin):
self.assertRejectedSlavePromiseWithPop(parameter_dict) self.assertRejectedSlavePromiseWithPop(parameter_dict)
expected_parameter_dict = { expected_parameter_dict = {
'monitor-base-url': None, 'monitor-base-url': 'None',
'domain': 'example.com', 'domain': 'example.com',
'accepted-slave-amount': '1', 'accepted-slave-amount': '1',
'rejected-slave-amount': '3', 'rejected-slave-amount': '3',
...@@ -5397,7 +5397,7 @@ class TestSlaveSlapOSMasterCertificateCompatibility( ...@@ -5397,7 +5397,7 @@ class TestSlaveSlapOSMasterCertificateCompatibility(
self.assertRejectedSlavePromiseWithPop(parameter_dict) self.assertRejectedSlavePromiseWithPop(parameter_dict)
expected_parameter_dict = { expected_parameter_dict = {
'monitor-base-url': None, 'monitor-base-url': 'None',
'domain': 'example.com', 'domain': 'example.com',
'accepted-slave-amount': '12', 'accepted-slave-amount': '12',
'rejected-slave-amount': '2', 'rejected-slave-amount': '2',
...@@ -6086,7 +6086,7 @@ class TestSlaveSlapOSMasterCertificateCompatibilityUpdate( ...@@ -6086,7 +6086,7 @@ class TestSlaveSlapOSMasterCertificateCompatibilityUpdate(
self.assertRejectedSlavePromiseWithPop(parameter_dict) self.assertRejectedSlavePromiseWithPop(parameter_dict)
expected_parameter_dict = { expected_parameter_dict = {
'monitor-base-url': None, 'monitor-base-url': 'None',
'domain': 'example.com', 'domain': 'example.com',
'accepted-slave-amount': '1', 'accepted-slave-amount': '1',
'rejected-slave-amount': '0', 'rejected-slave-amount': '0',
...@@ -6189,7 +6189,7 @@ class TestSlaveCiphers(SlaveHttpFrontendTestCase, TestDataMixin): ...@@ -6189,7 +6189,7 @@ class TestSlaveCiphers(SlaveHttpFrontendTestCase, TestDataMixin):
self.assertRejectedSlavePromiseWithPop(parameter_dict) self.assertRejectedSlavePromiseWithPop(parameter_dict)
expected_parameter_dict = { expected_parameter_dict = {
'monitor-base-url': None, 'monitor-base-url': 'None',
'domain': 'example.com', 'domain': 'example.com',
'accepted-slave-amount': '2', 'accepted-slave-amount': '2',
'rejected-slave-amount': '0', 'rejected-slave-amount': '0',
......
...@@ -137,7 +137,7 @@ pytz = 2016.10 ...@@ -137,7 +137,7 @@ pytz = 2016.10
requests = 2.13.0 requests = 2.13.0
six = 1.12.0 six = 1.12.0
slapos.cookbook = 1.0.121 slapos.cookbook = 1.0.121
slapos.core = 1.4.27 slapos.core = 1.4.28
slapos.extension.strip = 0.4 slapos.extension.strip = 0.4
slapos.extension.shared = 1.0 slapos.extension.shared = 1.0
slapos.libnetworkcache = 0.19 slapos.libnetworkcache = 0.19
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment