Skip to content

Commit 9b95bb0

Browse files
Addressed PR comments
1 parent 72e91c8 commit 9b95bb0

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

test/fixtures/nodebalancers_123456_configs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"ssl_commonname": "",
4141
"port": 80,
4242
"nodebalancer_id": 123456,
43-
"cipher_suite": "recommended",
43+
"cipher_suite": "none",
4444
"ssl_key": null,
4545
"nodes_status": {
4646
"up": 0,

test/unit/objects/nodebalancers_test.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,23 @@ def test_get_config(self):
4646
self.assertEqual(config_udp.protocol, "udp")
4747
self.assertEqual(config_udp.udp_check_port, 12345)
4848

49+
def test_update_config_udp(self):
50+
"""
51+
Tests that a config with a protocol of udp can be updated and that cipher suite is properly excluded in save()
52+
"""
53+
with self.mock_put(
54+
"nodebalancers/123456/configs/65431"
55+
) as m:
56+
config = self.client.load(NodeBalancerConfig, 65431, 123456)
57+
config.udp_check_port = 54321
58+
config.save()
59+
60+
self.assertEqual(
61+
m.call_url, "/nodebalancers/123456/configs/65431"
62+
)
63+
self.assertEqual(m.call_data["udp_check_port"], 54321)
64+
self.assertNotIn("cipher_suite", m.call_data)
65+
4966

5067
class NodeBalancerNodeTest(ClientBaseCase):
5168
"""

0 commit comments

Comments
 (0)