Update patch set 4

Patch Set 4:

(5 comments)

Patch-set: 4
This commit is contained in:
Gerrit User 36476 2024-05-10 20:19:43 +00:00 committed by Gerrit Code Review
parent e873dd7eaa
commit 1fb9ed350e
1 changed files with 115 additions and 0 deletions

View File

@ -34,6 +34,121 @@
"parentUuid": "a027501f_13e7d787",
"revId": "56a6cdb1d7b35578f23531f2f8d47065fddec1d9",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543"
},
{
"unresolved": true,
"key": {
"uuid": "13f9c9ea_12ab23bf",
"filename": "distributedcloud/dccommon/tests/unit/test_endpoint_cache.py",
"patchSetId": 4
},
"lineNbr": 151,
"author": {
"id": 36476
},
"writtenOn": "2024-05-10T20:19:43Z",
"side": 1,
"message": "nit: Since you already removed the get_admin_session method. It would be nice to also remove these",
"range": {
"startLine": 149,
"startChar": 0,
"endLine": 151,
"endChar": 63
},
"revId": "56a6cdb1d7b35578f23531f2f8d47065fddec1d9",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543"
},
{
"unresolved": true,
"key": {
"uuid": "7e39f8ff_046a1417",
"filename": "distributedcloud/dccommon/tests/unit/test_endpoint_cache.py",
"patchSetId": 4
},
"lineNbr": 183,
"author": {
"id": 36476
},
"writtenOn": "2024-05-10T20:19:43Z",
"side": 1,
"message": "nit: it\u0027s not necessarily a requirement, but it would be nice to have either succeeds or fails in the test so that it\u0027s easier to spot what the test should cover",
"range": {
"startLine": 183,
"startChar": 8,
"endLine": 183,
"endChar": 45
},
"revId": "56a6cdb1d7b35578f23531f2f8d47065fddec1d9",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543"
},
{
"unresolved": true,
"key": {
"uuid": "2c1bdcbd_7a47511b",
"filename": "distributedcloud/dccommon/tests/unit/test_endpoint_cache.py",
"patchSetId": 4
},
"lineNbr": 191,
"author": {
"id": 36476
},
"writtenOn": "2024-05-10T20:19:43Z",
"side": 1,
"message": "These methods can be the same with a for loop so that it\u0027s easier to add new conditions later, if necessary, and it also removes code duplication",
"range": {
"startLine": 183,
"startChar": 0,
"endLine": 191,
"endChar": 82
},
"revId": "56a6cdb1d7b35578f23531f2f8d47065fddec1d9",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543"
},
{
"unresolved": true,
"key": {
"uuid": "2c59282b_23f539ec",
"filename": "distributedcloud/dccommon/tests/unit/test_endpoint_cache.py",
"patchSetId": 4
},
"lineNbr": 194,
"author": {
"id": 36476
},
"writtenOn": "2024-05-10T20:19:43Z",
"side": 1,
"message": "It would be nice to also have some other invalid formats, such as 192.168.0.0.0, 192.168.256.0, 2620:10a:a001:ac09::7cg0 and 2620:10a::ac09::7ce0.\nThese would cover invalid IPv4 and IPv6 addresses note that the last one the cause is that there are multiple double colons.",
"range": {
"startLine": 194,
"startChar": 0,
"endLine": 194,
"endChar": 25
},
"revId": "56a6cdb1d7b35578f23531f2f8d47065fddec1d9",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543"
},
{
"unresolved": true,
"key": {
"uuid": "15cf7486_526008d3",
"filename": "distributedcloud/dccommon/tests/unit/test_endpoint_cache.py",
"patchSetId": 4
},
"lineNbr": 217,
"author": {
"id": 36476
},
"writtenOn": "2024-05-10T20:19:43Z",
"side": 1,
"message": "These could also be a single test. Using test_build_subcloud_endpoints_multiple_ips, you could change the dict to an array of dictionaries and execute a for loop to validate.\n\n```python\n def test_build_subcloud_endpoints_multiple_ips(self):\n subcloud_mgmt_ips_dict \u003d [\n {\"subcloud1\": \"192.168.1.1\"},\n {\"subcloud1\": \"192.168.1.1\", \"subcloud2\": \"192.168.1.2\"}\n ]\n \n for subcloud_mgmt_ips in subcloud_mgmt_ips_dict:\n expected_result \u003d {\n k: self._get_expected_endpoints(v) for k, v in subcloud_mgmt_ips.items()\n }\n self.assertEqual(\n endpoint_cache.build_subcloud_endpoints(subcloud_mgmt_ips),\n expected_result,\n )\n```",
"range": {
"startLine": 198,
"startChar": 0,
"endLine": 217,
"endChar": 9
},
"revId": "56a6cdb1d7b35578f23531f2f8d47065fddec1d9",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543"
}
]
}