Enable DataCenter tests
This commit is contained in:
parent
377b266d7b
commit
2e3f49ef36
@ -359,7 +359,6 @@ trait ResponseHandler
|
||||
case 303:
|
||||
$this->API->datacenter->curdc = $datacenter = (int) \preg_replace('/[^0-9]+/', '', $response['error_message']);
|
||||
if (isset($request['file']) && $request['file'] && $this->API->datacenter->has($datacenter . '_media')) {
|
||||
\danog\MadelineProto\Logger::log('Using media DC');
|
||||
$datacenter .= '_media';
|
||||
}
|
||||
if (isset($request['user_related']) && $request['user_related']) {
|
||||
|
@ -80,9 +80,12 @@ final class DataCenterTest extends TestCase
|
||||
|
||||
public function protocolProvider(): \Generator
|
||||
{
|
||||
yield;
|
||||
/*foreach ([false, true] as $test_mode) {
|
||||
foreach ([false, true] as $ipv6) {
|
||||
$ipv6Pair = [false];
|
||||
if (@\file_get_contents('https://ipv6.google.com')) {
|
||||
$ipv6Pair []= true;
|
||||
}
|
||||
foreach ([false, true] as $test_mode) {
|
||||
foreach ($ipv6Pair as $ipv6) {
|
||||
foreach (['tcp', 'ws', 'wss'] as $transport) {
|
||||
foreach ([true, false] as $obfuscated) {
|
||||
if ($transport !== 'tcp' && !$obfuscated) {
|
||||
@ -99,6 +102,6 @@ final class DataCenterTest extends TestCase
|
||||
yield ['tcp', false, 'http', $test_mode, $ipv6];
|
||||
yield ['tcp', false, 'https', $test_mode, $ipv6];
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,5 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
composer update
|
||||
composer test || {
|
||||
cat tests/MadelineProto.log
|
||||
exit 1
|
||||
}
|
||||
cat tests/MadelineProto.log
|
||||
|
||||
# Configure
|
||||
PHP_MAJOR_VERSION=$(php -r 'echo PHP_MAJOR_VERSION;')
|
||||
PHP_MINOR_VERSION=$(php -r 'echo PHP_MINOR_VERSION;')
|
||||
@ -15,6 +8,19 @@ PHP_MINOR_VERSION=$(php -r 'echo PHP_MINOR_VERSION;')
|
||||
|
||||
echo "Is release: $IS_RELEASE"
|
||||
|
||||
skip=n
|
||||
[ $PHP_MAJOR_VERSION -eq 7 ] && [ $PHP_MINOR_VERSION -ge 4 ] && {
|
||||
composer update
|
||||
composer test || {
|
||||
cat tests/MadelineProto.log
|
||||
exit 1
|
||||
}
|
||||
cat tests/MadelineProto.log
|
||||
} || {
|
||||
skip=y
|
||||
echo "Skip"
|
||||
}
|
||||
|
||||
# Clean up
|
||||
rm -rf phar7 phar5 MadelineProtoPhar
|
||||
madelinePath=$PWD
|
||||
|
Loading…
x
Reference in New Issue
Block a user