Conversation
Signed-off-by: currantw <taylor.curran@improving.com>
Signed-off-by: currantw <taylor.curran@improving.com>
Signed-off-by: currantw <taylor.curran@improving.com>
Signed-off-by: currantw <taylor.curran@improving.com>
Signed-off-by: currantw <taylor.curran@improving.com>
…and ::1 (IPv6). Signed-off-by: currantw <taylor.curran@improving.com>
Signed-off-by: currantw <taylor.curran@improving.com>
Signed-off-by: currantw <taylor.curran@improving.com>
Signed-off-by: currantw <taylor.curran@improving.com>
Signed-off-by: currantw <taylor.curran@improving.com>
Signed-off-by: currantw <taylor.curran@improving.com>
Signed-off-by: currantw <taylor.curran@improving.com>
Signed-off-by: currantw <taylor.curran@improving.com>
Signed-off-by: currantw <taylor.curran@improving.com>
| */ | ||
| protected function skipIfDnsNotEnabled(): void | ||
| { | ||
| if (!getenv('VALKEY_GLIDE_DNS_TESTS_ENABLED')) { |
There was a problem hiding this comment.
Shouldn't we always run the tests? Don't see any situation why we would skip those and not want them to run. We don't have this we any other test types.
If we want to have this functionality, could you please document this in a comment under which conditions will it be useful to skip these tests?
|
|
||
| /* Define to 1 if the PHP extension 'valkey_glide' is built as a dynamic | ||
| module. */ | ||
| /* Whether to build valkey_glide as dynamic module */ |
There was a problem hiding this comment.
Saw your commit message that this file is auto-generated. Is it auto-generated on local and needs to to be commited?
| @@ -0,0 +1,102 @@ | |||
| <?php | |||
|
|
|||
| defined('VALKEY_GLIDE_PHP_TESTRUN') or die("Use TestValkeyGlide.php to run tests!\n"); | |||
There was a problem hiding this comment.
Are these new tests getting picked on CI? You might need to add the following to TestValkeyGlide.php:
1. Add require_once __DIR__ . "/ValkeyGlideDnsTest.php";
2. Entries to $valid_classes array: 'valkeyglidedns' => 'ValkeyGlideDnsTest',
3. $default_classes .= 'valkeyglidetls,valkeyglideclustertls,valkeyglidedns,valkeyglideclusterdns';
Can you check if it is required in your case and check if the tests are actually running?
| ../valkey-glide/utils/cluster_manager.py --auth dummy_password stop --prefix auth-cluster || true | ||
| rm -rf ../valkey-glide/utils/clusters/auth-* 2>/dev/null || true | ||
|
|
||
| echo "✅ All Valkey servers stopped and cleaned up" |
There was a problem hiding this comment.
Please remove the check mark.
Summary
Add integration tests for
for the PHP Valkey GLIDE client.
Issue link
⚪ None
Features / Behaviour Changes
Add new DNS and IP address connectivity tests. See more details below.
Implementation
New Tests
ValkeyGlideDnsTest.php: DNS resolution tests with and without TLS for standalone:ValkeyGlideClusterDnsTest.php: DNS resolution tests with and without TLS for cluster:ValkeyGlideTlsTest.php: Comprehensive TLS tests for standalone including IP address connectivity:127.0.0.1).::1).ValkeyGlideClusterTlsTest.php: Comprehensive TLS tests for cluster including IP address connectivity:127.0.0.1).::1).ValkeyGlideTest.phpandValkeyGlideClusterTest.phpenhancements: Add non-TLS IP address connectivity tests:127.0.0.1).::1).DNS tests require hostname mappings and the environment variable
VALKEY_GLIDE_DNS_TESTS_ENABLEDto be set.Test Infrastructure Improvements
ValkeyGlideBaseTest.php:assertConnected(),skipIfTlsDisabled(),skipIfTlsEnabled(),getCaCertificate(), andskipIfDnsNotEnabled().assertThrows()helper toTestSuite.phpfor exception testing.ValkeyGlideBaseTest.php.stop-servers.shscript for cleanup.Limitations
DNS tests require host file entries mapping
valkey.glide.test.tls.comandvalkey.glide.test.no_tls.comto127.0.0.1and::1. These must be configured manually for local development (automatically configured in CI).Testing
See New Tests above.
Related Issues
Checklist
Before submitting the PR make sure the following are checked:
CHANGELOG.md and documentation files are updated.