David Z: How to run TLS regression test in PostgreSQL

原文英文,约900词,阅读约需4分钟。发表于:

1. Overview In my previous blogs, I discussed Setting up a debugging environment in PostgreSQL to better understand OpenSSL APIs, Enhance PostgreSQL TLS Security with OCSP Stapling, and How to setup TLS connection for PostgreSQL. In this blog, I will share a simple procedure about How to run SSL/TLS regression tests in PostgreSQL. 2. Postgres regression tests Whenever we want to add a new feature or make some fix, we should run the tests provided by PostgreSQL to make sure nothing is broken. If the new feature or the fix does not have corresponding tests, we should consider adding some to ensure it will not break in the future when other changes are made. PostgreSQL provides a comprehensive document) explaining all available tests. For example, if you want to run a quick regression test to check if any “core” feature may be broken, you can run make check for a temporary installation within the build tree or make installcheck against a running PostgreSQL server. make check and make installcheck will only test the built-in functionality of the PostgreSQL server. To run all tests for the modules that have been selected to be built, including the core tests, you need to run either make check-world or make installcheck-world corresponding to a temporary installation within the build tree or a running PostgreSQL server. However, some features still won’t be tested by running make check-world or make installcheck-world, such as the security-related features, ssl, kerberos, etc. One of the reasons is that these test cases need some special settings. To run a regression test for these features, as the document mentioned, you need to run the tests like make check-world PG_TEST_EXTRA='kerberos ldap ssl load_balance'. 3. Run SSL/TLS Regression Tests To run the regression tests for SSL/TLS related features, first, you need to compile PostgreSQL with the SSL library enabled. For example, running the commands below will compile PostgreSQL with OpenSSL libraries: git clone https://github.com/postgres/post[...]

本文介绍了如何在PostgreSQL中运行SSL/TLS回归测试。首先需要使用SSL库编译PostgreSQL,然后运行make check-world命令进行测试。如果测试通过,可以使用make check命令运行SSL/TLS测试。测试结果将会在日志中显示。此外,文章还提到了证书在SSL/TLS回归测试中的重要性。

David Z: How to run TLS regression test in PostgreSQL
相关推荐 去reddit讨论