* Fix APM and CSFLE tests for Windows CI
* Add Windows to GitHub CI and build DLLs for releases
* Add --enable-debug-pack configure opt to generate PDB files
* Reminder to check for Windows build artifacts before publishing releases
* Revise advice on publicizing releases
* Match error message variations between libmongoc 1.23+ and older
This typo was corrected in mongodb/mongo-c-driver@1d7229f0e9 and will appear in the 1.23.0 release.
* PHPC-2103: Report loaded crypt_shared version in phpinfo()
* PHPC-2132: Fix pattern for matching phpinfo() values
This also fixes the injection logic in create_test_manager(), which should only kick in when "autoEncryption" opts are specified (as PHPLIB does) and check for a valid $driverOptions structure (to accomodate manager-ctor error tests).
* Add missing macros for declaring arguments
* Add macros to define disabled constructor and __wakeup
* Define arginfo via stubs for BSON classes
* Declare tentative return types in interfaces
* Add correct return type for __set_state methods
* Generate class entries for BSON classes
* Declare Binary class constants in stub file
* Use stubs in exception classes
* Add stubs for monitoring classes
* Fix wrong JsonSerializable class in BSON stubs
* Disable declaration-after-statement
This is necessary to let the generated arginfo files compile
* Use stubs for driver classes
* Fix deprecation messages in tests
* Add missing macro
* Fix tests relying on value injection
* Parse parameters in disabled constructor/wakup function
* Add note about arginfo files to contribution docs
* Add GitHub action to check generated arginfo files
* PHPC-2115: Use DateTimeInterface in UTCDateTime constructor signature
* Don't install mongodb extension in GitHub actions workflows
* Change indentation in stub files
* Use individual #if conditions for each stub method
* Make disabled constructor/wakeup methods static
* Fix bulkWrite parameter name
* Use %d to match property count in tests
* Ensure all classes with disabled serialisation declare __wakeup
* Use non-breaking space in OS axis labels
* Revise titles and Manager construction in autoEncryption tests
* Define CSFLE_KEY_VAULT_NS and CSFLE_LOCAL_KEY constants
The value for CSFLE_KEY_VAULT_NS is based on the example from PHPLIB-826. This was not required but helps makes all tests consistent and will make it easier if we need to add functionality to a helper to drop the key vault collection before a test.
Using CSFLE_LOCAL_KEY allows removal of a duplicated string literal in various CSFLE tests. Although the new constant wasn't required for all tests (empty strings worked fine to satisfy option validation), using a constant helps ensure consistency across the test suite.
Also use create_test_manager() in more places when basic.inc is included. The remaining instances of direct Manager construction should only be in tests where basic.inc isn't used.
* Remove pre-3.6 server versions from Evergreen matrix
* Remove skipped tests for pre-3.6 servers
* Remove old mongo-orchestration configs and Evergreen tasks
* Remove flaky replica set tests
These tests assume a particular replica set member is always the primary, so tag assertions may fail if a different member is elected. The server-getTags-002.phpt test has more flexible assertions for replica set tags, so we can safely remove these tests.
* PHPC-1878: Explicitly use w:1 for local database
* PHPC-2008: Skip test requiring role to drop local collection
The "restore" role is required to drop collections in the "local" database. Mongo Orchestration does not yet grant that role for its users.
Skip tests expecting gossiped $clusterTime on first command. This may be a bug in libmongoc, per CDRIVER-4174.
Make exception assertion in TLS tests more flexible. Expect parent ConnectionException to accomodate load balanced clients, which do not use server selection. Both exception messages will include a common prefix from libmongoc.
Do not assert exception message for failed TLS connection. While the message will typically include "TLS handshake failed", that is not guaranteed.
Make ping response assertions in TLS tests more flexible. Sharded clusters and replica sets may return additional fields in the ping response (e.g. cluster time). These tests were originally written to expect a standalone response.
Allow unset RTT (-1) for load balanced client.
Note SRV caveat for is_replica_set test function.
Allow load balancers for tests that require sharded clusters. Load balancers should always proxy a mongos, so existing skip functions that check for mongos can now allow a load balancer. If there is some incompatibility specific to LBs, we can address that later with a LB-specific skip function.
Require mongos for pinning tests. Pinning does not apply to load balanced clients, since there is only one connection.
This also consolidates INI functions (and trace logging) into a separate file and ensure that mongoc logging is disabled during GSHUTDOWN (avoiding a potential segfault).
Enable service ID mocking when testing load balancers with HAProxy.
* Fix message for catching wrong exception in raises()
The original implementation of raises() in c6a793d466 apparently referenced an undeclared $exceptionname variable several times. That was later addressed 804f383aea but that commit neglected to fix this reference.
* Refactor raises() and throws() utility functions
* Introduce MongoDB\Driver\ServerApi
* Accept serverApi driver option
* Introduce create_test_manager factory to create manager
A centralised entry point is required to inject the API_VERSION env variable later.
* Add build variant to test with requireApiVersion=true
* Fix wrong configuration for auth variable
This changed when migrating from our own scripts to drivers-evergreen-tools and was not updated properly, causing all tests to run with auth disabled.
* Declare ZEND_PARSE_PARAMETERS_NONE macro
This macro is missing on PHP < 7.3
* Remove duplicated API param storage
* Add missing semicolons
* Add ZEND_PARSE_PARAMETERS_NON_EX macro
* Extract error handling functionality to separate macros
* Throw if internal mongoc_server_api_t is already initialised
* Use imported namespaces in tools file
* Fix type info for reflection
* Use American English spelling
* Only use typed serialize signature on PHP 8+
* Update PHONGO_PARSE_PARAMETERS_NONE macro for PHP < 7.3
* Remove usage of ZEND_STRL within zend_hash_str_add
This causes compile failures on PHP < 7.3 that I have yet to understand.
* Fix errors in new PHONGO_PARSE_PARAMETERS macros
* Add GitHub Action workflow for tests
* Add workflow to check formatting
* Remove travis-ci config
* Fix clang-format error
* Add shared json extension for tests
* Hide output for xfail tests
* Use mongo-orchestration configs from drivers-evergreen-tools
* Drop obsolete test scripts
This drops the legacy VM environment and remnants of the travis-ci config
* Remove obsolete server_id config
* Add note about MONGO_ORCHESTRATION_URI to contribution docs
* Restore previous XFAIL behaviour
This did not have the expected effect of preventing diff output for tests that expect failures, so it can be reverted.
* Make SSL certificate path configurable for tests
Since mongo-orchestration will always bring its own certificates, we need to set the correct SSL certificate directory for our tests. This is skipped on GitHub Actions as we don't test SSL builds there (yet). If SSL_DIR was not set, tests requiring SSL will be skipped.
* Fix code review nits
Syncs tests with mongodb/specifications@1713439515. Includes tests for PHPC-1655 and PHPC-1652.
Adds logic to canonicalize $numberDouble values, which allows previously skipped tests to pass. This was noticed because SPEC-1537 changed the description of these tests and they were no loner skipped by convert-bson-corpus-tests.php.
executeBulkWrite() will now throw a BulkWriteException on top of any previous exception to ensure that a WriteResult can be attached. InvalidArgumentException is excluded, since that is only thrown before mongoc_bulk_operation_execute does IO (e.g. batch is empty).
This is necessary, because without it, the check for whether SSL is enabled
fails, as the phpinfo() output buffer that it uses gets aborted with::
[2018/12/11 16:35:00.441] 099+ date/time support => enabled
[2018/12/11 16:35:00.441] 100+ "Olson" Timezone Database Version => 2015.5
[2018/12/11 16:35:00.441] 101+ Timezone Database => internal
[2018/12/11 16:35:00.441] 102+ skip E_WARNING: phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. @ /data/mci/d58ba616b6660bdc1a013e7e0584a4dd/src/tests/utils/tools.php:74