Commit Graph

90 Commits

Author SHA1 Message Date
Jeremy Mikola 04d1a96627 PHPC-2200: Add MongoDB rapid releases to Evergreen matrix (#1408)
* Add rapid to mongodb-versions axis

* Bump latest-stable to 6.0 in mongodb-edge-versions matrix

* Include newer server versions in OCSP, requireApiVersion, loadBalanced, and skip_crypt_shared matrices

* Rename VERSION to MONGODB_VERSION

* Unwrap array in single value matrix_spec configuration
2023-04-11 04:14:01 -04:00
Jeremy Mikola 9351ccaee1 PHPC-2164: Refactor run-ocsp-responder.sh to use activate-ocspvenv.sh (#1391) 2022-12-15 09:15:01 -05:00
Jeremy Mikola 6a7a2ba546 Bump to libmongoc to 1.24-dev (#1388)
* Update expected output for libmongoc 1.24-dev

See mongodb/mongo-c-driver@40a64c2ffd

* Require C99 when compiling
2022-11-30 03:06:12 -05:00
Jeremy Mikola e3d1d37e42 PHPC-2153: Add PHP 8.2 to Evergreen matrix (#1379) 2022-11-01 23:52:44 -04:00
Andreas Braun ae18d5ccab Bump to libmongoc 1.23.1 (#1377) 2022-10-21 13:11:07 +02:00
Jeremy Mikola dadb93fb34 Merge branch 'v1.14'
v1.14 pointed to libmongoc 1.14.2, which was released some time after the submodule target in the master branch (a dev commit before libmongoc 1.23.0). To resolve this conflict, the libmongoc submodule has been bumped to 1.23.0.

Note: a libmongoc 1.23.1 tag also exists, but that bump can be done in a subsequent PHPC ticket related to the libmongoc changes therein.

This also adds a section to CONTRIBUTING.md to provide guidance on resolving submodule merge conflicts.
2022-10-20 21:44:20 +08:00
Jeremy Mikola e853c4c0e6 PHPC-2157: Bump pkg-config requirement and libmongoc-version matrix to 1.22.2
This was missed in 0a23d0a94b
2022-10-20 20:51:55 +08:00
Jeremy Mikola 2790a68af1 Bump upcoming-stable libmongoc-version to r1.23 branch 2022-09-09 16:03:25 -04:00
Jeremy Mikola 5c0b2c4f04 Merge branch 'v1.14' 2022-09-09 16:01:06 -04:00
Jeremy Mikola 620778dbf5 PHPC-2137: Bump libmongoc-version in Evergreen config (#1361) 2022-09-09 16:00:37 -04:00
Jeremy Mikola 7f7ea9f7ab Merge branch 'v1.14' 2022-09-07 11:29:15 -04:00
Jeremy Mikola fa7dd55c13 PHPC-2135: Test with consistent version of crypt_shared (#1353)
Use the crypt_shared library provisioned by download-mongodb.sh and add an additional task to disable the library and fall back to mongocryptd.

This also revises how we pass environment variables into run-tests.sh and the test suite. Everything is now explicitly passed instead of relying on export attributes from a parent context.
2022-09-07 11:28:13 -04:00
Jeremy Mikola dfa4c20f8b Merge branch 'v1.14' 2022-08-30 15:57:06 -04:00
Jeremy Mikola 746919519c PHPC-2131: Ensure CRYPT_SHARED_LIB_PATH is exported for tests (#1352)
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).
2022-08-30 11:37:08 -04:00
Andreas Braun 0a712a3265 PHPC-2118: Test load-balanced on debian11 (#1344) 2022-08-16 10:47:39 +02:00
Jeremy Mikola 03fcb6b9ef PHPC-2099: crypt_shared testing (#1333)
* 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.
2022-06-22 13:37:56 -04:00
Jeremy Mikola dec2ed29b9 PHPC-2086: Test against MongoDB 6.0 in Evergreen and revise matrices (#1332)
Update axes definitions:
 * Add "mongodb" to version and edge-version axes names
 * Add MongoDB 6.0 to mongodb-versions axis
 * Fix latest-stable in mongodb-edge-versions axis (5.0 label was actually using MongoDB 4.0)
 * Bump latest-stable in php-edge-versions axis to PHP 8.1
 * Use debian11 for testing server versions not on debian92
 * Make RHEL host names consistent with those in mongo-php-toolchain
 * Fix label for zSeries (7.4 label was always using RHEL 7.2)

Revise test matrices:
 * Test all PHP versions with latest-stable MongoDB on Debian 11 and RHEL 7.0
 * Test all topologies and MongoDB versions with latest-stable PHP version on Debian
 * Restrict testing of ARM64, Power8, and zSeries architectures to MongoDB 4.4
 * Restrict testing of non-WiredTiger storage engines to MongoDB 4.0
 * Update mongodb-versions for OCSP, Stable API, and load balancer matrices
 * Use Debian 10 for OCSP testing (MongoDB 4.4+)
 * Use Debian 11 for Stable API testing (MongoDB 5.0+)
 * Keep Debian 9.2 for load balancer testing and remove MongoDB 6.0. Switch to Debian 11 once haproxy is available (see: BUILD-15237)

Use standalone-ssl, replicaset-auth, and sharded tasks for most matrices. The full set of tasks will be used for testing "all topologies and MongoDB versions".
2022-06-17 21:18:23 -04:00
Jeremy Mikola b73afcd482 PHPC-2053: Remove mongodb.mock_service_id INI option
Note: this was only used for internal testing and should not be considered a BC break.
2022-05-23 13:55:40 -04:00
Jeremy Mikola 163d91076e PHPC-2090: Add MongoDB 5.0 to load balancer CI matrix 2022-05-23 13:55:40 -04:00
Jeremy Mikola 98727aee85 PHPC-2005: Support 'let' option for multiple CRUD commands (#1312) 2022-03-31 17:03:57 -04:00
Jeremy Mikola 33e2e903fe Bump lowest-supported libmongoc-version in Evergreen config 2022-03-23 12:19:29 -04:00
Jeremy Mikola 93efe0aeb6 PHPC-2073: Remove references to pre-3.6 servers (#1305)
* 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.
2022-03-01 20:30:00 -05:00
Jeremy Mikola 03d8858bff PHPC-2013: Upgrade libmongoc to 1.21.0
Pulls in changes from CDRIVER-4237

Also addresses min/maxWireVersion bumps for PHPC-1909 and PHPC-2034.
2022-02-10 13:20:22 -05:00
Jeremy Mikola f681a0bd2f PHPC-2047: Update load balancer testing config (#1300)
* PHPC-2047: Update load balancer testing config

Upstream changes in drivers-evergreen-tools now require passing LOAD_BALANCER to run-orchestration.sh. Additionally, service ID mocking is no longer required as of server version 5.1.

* Add missing live server checks in tests
2022-02-03 14:49:19 -05:00
Jeremy Mikola 9d87767176 PHPC-1931: Add PHP 8.1 and rename OS axis labels (#1276) 2021-11-29 15:08:43 -05:00
Jeremy Mikola fe99deb32a PHPC-1880: Drop support for PHP 7.1 (#1273)
* PHPC-1880: Drop support for PHP 7.1

* Bump PHP versions in AppVeyor config

* PHPC-1880: Update Evergreen config for PHP 7.2+ and MongoDB 5.0

Bump edge-versions:latest-stable to MongoDB 5.0. Drops PHP 7.1 and adds PHP 8.0 to php-versions and newly created php-edge-versions axis.

Use oldest-supported or latest-stable PHP version for matrices other than test-php-versions.

Make variant display names consistent to help detect duplicates.

Remove WiredTiger from mongo-42-storage-engines since it's tested in most other variants by default.

* Revise "cursor not found" error message assertions for latest server version

* Temporarily remove 1.19.x from libmongoc-version axis
2021-11-10 10:28:21 -05:00
Jeremy Mikola 20899c5c35 PHPC-1994: Fix Evergreen testing for custom libmongoc versions (#1271)
Also updates versions in the libmongoc-version axis.
2021-11-02 14:52:11 -04:00
Jeremy Mikola 419891d369 PHPC-1995: Use https:// instead of git:// for git clone 2021-11-02 11:35:12 -04:00
Jeremy Mikola 30a85132ca PHPC-1968, PHPC-1992: Update Atlas URIs for 4.0 clusters and serverless (#1268) 2021-10-27 13:30:50 -04:00
Jeremy Mikola cfc6bbbe5d PHPC-1978: Expose mongoc_global_mock_service_id as INI option
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.
2021-10-15 13:44:30 -04:00
Jeremy Mikola 442ae92b91 PHPC-1977: Add load balancer test to Evergreen matrix 2021-10-14 17:08:45 -04:00
Jeremy Mikola f10e27a5d9 Remove AUTH and document other env vars for run-tests.sh
AUTH dates back to cee996bc79 and was likely derived from the drivers-evergreen-tools template. It is no longer set from the Evergreen task config and serves no functional purpose.
2021-10-14 17:06:59 -04:00
Andreas Braun a6dcf7834e Update list of tested libmongoc versions (#1238) 2021-07-13 15:54:36 +02:00
Jeremy Mikola f62cbb3cd6 PHPC-1782 and PHPC-1877: Do not test MongoDB 5.0 on zseries and power8 (#1236)
* PHPC-1877: Do not test MongoDB 5.0+ on rhel71-power8

This also removes "latest" because it resolves to the last supported release (4.9-dev).

* PHPC-1782: Do not test MongoDB 5.0+ on rhel74-zseries
2021-07-09 12:15:39 -04:00
Andreas Braun 2ab8d6bac1 Drop support for PHP 7.0 (#1234) 2021-07-01 11:58:02 -04:00
Andreas Braun 135fe453bb PHPC-1848: Add 5.0 to the server testing matrix (#1222)
* Add 5.0 to the test matrix

* Use different query operator to trigger error

5.0 throws a different error for top-level fields with dollars, so we're using an unknown operator instead.

* Introduce edge-versions axis to test against latest stable
2021-05-27 10:33:42 +02:00
Jeremy Mikola 553aaeca55 Merge branch 'v1.9' 2021-05-11 13:10:36 -04:00
Jeremy Mikola 1dcfb803ec Merge branch 'v1.8' into v1.9 2021-05-11 13:10:26 -04:00
Jeremy Mikola 96bbdab677 PHPC-1835: Rotate credentials for Atlas connectivity tests (#1220)
* Use ping instead of isMaster in Atlas connectivity tests

* PHPC-1835: Rotate credentials for Atlas connectivity tests

This corresponds with a change to the project's Evergreen config to rotate keys for decrypting atlas-uris.txt.enc.

Additionally, this adds comments atlas-uris.txt and atlas.phpt test output for improved readability.
2021-05-11 13:09:58 -04:00
Jeremy Mikola adcd45030c Merge branch 'v1.9' 2021-03-31 11:49:16 -04:00
Andreas Braun c6d763a835 PHPC-1795 Remove xtrace from build scripts (#1212) 2021-03-31 14:22:24 +02:00
Andreas Braun deead9687e PHPC-1716 Allow configuring server API version in manager (#1204)
* 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
2021-03-26 15:43:48 +01:00
Andreas Braun ddfe1c3321 Fix running auth tests (#1206)
* Fix running auth tests

* Fix flaky tests on replica sets

* Remove arbiters from replica set config

This was done for auth due to a bug fixed in 3.7.7, but the change was not reverted (see https://github.com/mongodb-labs/drivers-evergreen-tools/pull/38).

* Harden test against non-deterministic return order
2021-03-25 10:25:42 +01:00
Andreas Braun 37408e1ccf Merge branch 'v1.9'
* v1.9:
  PHPC-1739 Move from travis-ci to GitHub Actions (#1199)
  PHPC-1774 Fix truncation of PHP_VERSION constant in handshake metadata (#1202)
  PHPC-1775 Use correct size for strncpy in when initialising DBPointer (#1203)
2021-02-23 14:52:15 +01:00
Andreas Braun ed31cba5cb PHPC-1739 Move from travis-ci to GitHub Actions (#1199)
* 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
2021-02-23 14:49:54 +01:00
Andreas Braun f1bdaa4bb9 Write test results to junit log file (#1200) 2021-02-17 10:19:54 +01:00
Andreas Braun 500cc8254e Autodetect PHP patch version (#1201) 2021-02-17 10:19:10 +01:00
Andreas Braun c8b8584670 Add MongoDB 4.4 to tested server versions 2020-06-29 14:24:09 +02:00
Andreas Braun d6f307209d Update to latest libmongoc 1.17 version 2020-05-30 17:04:05 +02:00
Andreas Braun 083517bfee Bump to latest libmongoc version 2020-05-20 14:31:24 +02:00