⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.94
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
Server Software:
Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
local
/
src
/
mongodb-1.11.1
/
tests
/
connect
/
View File Name :
replicaset-seedlist-001.phpt
--TEST-- MongoDB\Driver\Manager: Connecting to Replica Set with only secondary in seedlist --SKIPIF-- <?php require __DIR__ . "/../utils/basic-skipif.inc"; ?> <?php skip_if_not_replica_set(); ?> <?php skip_if_no_secondary(); ?> <?php skip_if_not_clean(); ?> --FILE-- <?php require_once __DIR__ . "/../utils/basic.inc"; $secondary = get_secondary_server(URI); $info = $secondary->getInfo(); // As we're building our own URL here, we do need to extract username and password $url = parse_url(URI); if (array_key_exists('user', $url) && array_key_exists('pass', $url)) { $dsn = sprintf('mongodb://%s:%s@%s', $url['user'], $url['pass'], $info['me']); } else { $dsn = 'mongodb://' . $info['me']; } $manager = create_test_manager($dsn, ['replicaSet' => $info['setName']]); // load fixtures for test $bulk = new \MongoDB\Driver\BulkWrite(); $bulk->insert(array("_id" => 1, "x" => 2, "y" => 3)); $bulk->insert(array("_id" => 2, "x" => 3, "y" => 4)); $bulk->insert(array("_id" => 3, "x" => 4, "y" => 5)); $manager->executeBulkWrite(NS, $bulk); ?> ===DONE=== <?php exit(0); ?> --EXPECT-- ===DONE===