)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"298a71b642edced89e8c8a9d47a830a930bcc44c","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix disable_ssl_certificate_validation values if ca_certificates file is defined"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Refactors http.py to correctly disable certificate validation even if the ca_certification location is provided."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: Iae42b5c2b4381947df71004613ca0a82b29730bb"},{"line_number":12,"context_line":"Closes-Bug: #1705769"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ff346bd7_bc4a5c24","line":9,"updated":"2017-07-24 21:25:04.000000000","message":"Two comments here:\n\n1) L9 is a little long (so it should be broken up across 2 lines).\n2) Your explanation in your bug report is more thorough and can be used as the commit message instead:\n\n\"In ClosingHttp.__init__, if disable_ssl_certification_validation is True and ca_certs is defined, tempest should not try to validate the ca_certificates file. If the certificate is self-signed, the validation will execute and fail. As it is right now if both of those values are defined, tempest.conf will try to validate the self-signed certs and it will fail. Instead, it should support self-signed certs that will not pass validation. The code should be re-sequenced to disable certificate validation even if the ca_cert location is provided.\"\n\n(Obviously keep the commit title).","commit_id":"b04656086e8b0b13d20c7d23241612115bd4c7e8"}],"tempest/tests/lib/common/test_http.py":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"298a71b642edced89e8c8a9d47a830a930bcc44c","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class TestClosingHTTP(base.TestCase):"},{"line_number":23,"context_line":"    def test_constructor(self):"},{"line_number":24,"context_line":"        connection \u003d http.ClosingHttp(disable_ssl_certificate_validation\u003dFalse,"},{"line_number":25,"context_line":"                                      ca_certs\u003dNone, timeout\u003dNone)"},{"line_number":26,"context_line":"        self.assertRaises(KeyError, getitem, connection.connection_pool_kw,"},{"line_number":27,"context_line":"                          \u0027cert_reqs\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff346bd7_3c9b0cca","line":24,"updated":"2017-07-24 21:25:04.000000000","message":"You\u0027ve provided 4 scenarios; it makes sense to test each scenario independently. Example:\n\n1) test_constructor_invalid_ca_certs_and_timeout\n2) test_constructor_valid_ca_certs\n3) test_constructor_ssl_cert_validation_disabled\n4) test_constructor_ssl_cert_validation_disabled_and_ca_certs","commit_id":"b04656086e8b0b13d20c7d23241612115bd4c7e8"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"298a71b642edced89e8c8a9d47a830a930bcc44c","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    def test_constructor(self):"},{"line_number":24,"context_line":"        connection \u003d http.ClosingHttp(disable_ssl_certificate_validation\u003dFalse,"},{"line_number":25,"context_line":"                                      ca_certs\u003dNone, timeout\u003dNone)"},{"line_number":26,"context_line":"        self.assertRaises(KeyError, getitem, connection.connection_pool_kw,"},{"line_number":27,"context_line":"                          \u0027cert_reqs\u0027)"},{"line_number":28,"context_line":"        self.assertRaises(KeyError, getitem, connection.connection_pool_kw,"},{"line_number":29,"context_line":"                          \u0027ca_certs\u0027)"},{"line_number":30,"context_line":"        self.assertRaises(KeyError, getitem, connection.connection_pool_kw,"},{"line_number":31,"context_line":"                          \u0027timeout\u0027)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        cert_location \u003d \"/etc/ssl/certs/ca-certificates.crt\""},{"line_number":34,"context_line":"        cert_required \u003d \u0027CERT_REQUIRED\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff346bd7_fc7d846e","line":31,"range":{"start_line":26,"start_character":8,"end_line":31,"end_character":36},"updated":"2017-07-24 21:25:04.000000000","message":"Two things:\n\n1) It\u0027s better to do self.assertNotIn(\u0027timeout\u0027, connection.connection_pool_kw)\n2) This can be written more compactly using a for loop, e.g.:\n\n    for attr in (\u0027cert_reqs\u0027, \u0027ca_certs\u0027, \u0027timeout\u0027):\n        self.assertNotIn(attr, connectio.connection_pool_kw)","commit_id":"b04656086e8b0b13d20c7d23241612115bd4c7e8"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"298a71b642edced89e8c8a9d47a830a930bcc44c","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        cert_required \u003d \u0027CERT_REQUIRED\u0027"},{"line_number":35,"context_line":"        connection \u003d http.ClosingHttp(disable_ssl_certificate_validation\u003dFalse,"},{"line_number":36,"context_line":"                                      ca_certs\u003dcert_location, timeout\u003dNone)"},{"line_number":37,"context_line":"        self.assertEqual(connection.connection_pool_kw[\u0027cert_reqs\u0027],"},{"line_number":38,"context_line":"                         cert_required)"},{"line_number":39,"context_line":"        self.assertEqual(connection.connection_pool_kw[\u0027ca_certs\u0027],"},{"line_number":40,"context_line":"                         cert_location)"},{"line_number":41,"context_line":"        self.assertRaises(KeyError, getitem, connection.connection_pool_kw,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff346bd7_5ce37034","line":38,"range":{"start_line":37,"start_character":25,"end_line":38,"end_character":38},"updated":"2017-07-24 21:25:04.000000000","message":"The order of these 2 args should be swapped, because:\n\n    self.assertEqual(expected_value_here, actual_value_here)\n\nis the correct usage for debugging purposes (i.e. the debug message that is output in case the assertion fails assumes that the expected value comes before the actual value).","commit_id":"b04656086e8b0b13d20c7d23241612115bd4c7e8"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"298a71b642edced89e8c8a9d47a830a930bcc44c","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        self.assertEqual(connection.connection_pool_kw[\u0027cert_reqs\u0027],"},{"line_number":48,"context_line":"                         cert_none)"},{"line_number":49,"context_line":"        self.assertEqual(connection.connection_pool_kw[\u0027timeout\u0027], 30)"},{"line_number":50,"context_line":"        self.assertRaises(KeyError, getitem, connection.connection_pool_kw,"},{"line_number":51,"context_line":"                          \u0027ca_certs\u0027)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        connection \u003d http.ClosingHttp(disable_ssl_certificate_validation\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff346bd7_fccb44a2","line":50,"range":{"start_line":50,"start_character":13,"end_line":50,"end_character":25},"updated":"2017-07-24 21:25:04.000000000","message":"assertNotIn (refer to the comments above).","commit_id":"b04656086e8b0b13d20c7d23241612115bd4c7e8"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"298a71b642edced89e8c8a9d47a830a930bcc44c","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                          connection.connection_pool_kw, \u0027timeout\u0027)"},{"line_number":57,"context_line":"        self.assertEqual(connection.connection_pool_kw[\u0027cert_reqs\u0027],"},{"line_number":58,"context_line":"                         cert_none)"},{"line_number":59,"context_line":"        self.assertRaises(KeyError, getitem, connection.connection_pool_kw,"},{"line_number":60,"context_line":"                          \u0027ca_certs\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff346bd7_dcd08053","line":59,"range":{"start_line":59,"start_character":13,"end_line":59,"end_character":25},"updated":"2017-07-24 21:25:04.000000000","message":"assertNotIn (refer to the comments above).","commit_id":"b04656086e8b0b13d20c7d23241612115bd4c7e8"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"41b75f9b3a5347b66239c9fef1283a3cd6c152ce","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"class TestClosingHTTP(base.TestCase):"},{"line_number":20,"context_line":"    def test_constructor(self):"},{"line_number":21,"context_line":"        test_constructor_invalid_ca_certs_and_timeout \u003d http.ClosingHttp("},{"line_number":22,"context_line":"            disable_ssl_certificate_validation\u003dFalse,"},{"line_number":23,"context_line":"            ca_certs\u003dNone,"},{"line_number":24,"context_line":"            timeout\u003dNone)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff346bd7_14bfca61","line":21,"range":{"start_line":21,"start_character":8,"end_line":21,"end_character":53},"updated":"2017-07-26 04:56:11.000000000","message":"Sorry if I wasn\u0027t clear last time. What I meant was you can split test_constructor into 4 tests. That is:\n\ndef test_constructor_invalid_ca_certs_and_timeout(self):\n    connection \u003d http.ClosingHttp(\n            disable_ssl_certificate_validation\u003dFalse,\n            ca_certs\u003dNone,\n            timeout\u003dNone)\n    for attr in (\u0027cert_reqs\u0027, \u0027ca_certs\u0027, \u0027timeout\u0027):\n        self.assertNotIn(attr, connection.connection_pool_kw)\n\ndef test_constructor_valid_ca_certs(self):\n    cert_location \u003d \"/etc/ssl/certs/ca-certificates.crt\"\n    cert_required \u003d \u0027CERT_REQUIRED\u0027\n    ...\n\n...\n\nIf you want to reuse a variable like \"cert_none\" you can do:\n\ndef setUp(self):\n    super(..., self).setUp()\n    self.cert_none \u003d \"CERT_NONE\"\n\n...\n\ndef test_constructor_ssl_cert_validation_and_ca_certs(self):\n    ...\n    self.assertEqual(\n        self.cert_none, connection.connection_pool_kw[\u0027cert_reqs\u0027])","commit_id":"b0ccf7cbeb74c7ef6c1604d3edd551570a43cea4"},{"author":{"_account_id":26198,"name":"Anna Pankiewicz","email":"anna.e.pankiewicz@att.com","username":"apankiewicz"},"change_message_id":"0f6dfe472aafffcf1dc74bbf21b090a2dbe15c16","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"class TestClosingHTTP(base.TestCase):"},{"line_number":20,"context_line":"    def test_constructor(self):"},{"line_number":21,"context_line":"        test_constructor_invalid_ca_certs_and_timeout \u003d http.ClosingHttp("},{"line_number":22,"context_line":"            disable_ssl_certificate_validation\u003dFalse,"},{"line_number":23,"context_line":"            ca_certs\u003dNone,"},{"line_number":24,"context_line":"            timeout\u003dNone)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff346bd7_e0b8f1c8","line":21,"range":{"start_line":21,"start_character":8,"end_line":21,"end_character":53},"in_reply_to":"ff346bd7_14bfca61","updated":"2017-07-26 13:18:24.000000000","message":"That\u0027s on me for not clarifying before I changed it. Thanks for explaining further!","commit_id":"b0ccf7cbeb74c7ef6c1604d3edd551570a43cea4"}]}
