Print error messages for managed identity test (#1392)
* Print error messages for managed identity test * Skip appveyor MSI tests * Skip msi tests for unix
This commit is contained in:
parent
e2c15977ef
commit
ed96718152
9
.gitignore
vendored
Normal file
9
.gitignore
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
.vs
|
||||
.vscode
|
||||
__pycache__
|
||||
*.diff
|
||||
*.exp
|
||||
*.log
|
||||
*.sh
|
||||
*.out
|
||||
test/**/**/*.php
|
|
@ -12,6 +12,7 @@ environment:
|
|||
SQLSRV_DBNAME: msphpsql_sqlsrv
|
||||
PDOSQLSRV_DBNAME: msphpsql_pdosqlsrv
|
||||
PYTHON: c:\Python36
|
||||
APPVEYOR: true
|
||||
# For details about Appveyor build worker images (VM template): https://www.appveyor.com/docs/build-environment/#build-worker-images
|
||||
matrix:
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
|
|
|
@ -3,7 +3,11 @@ Test some error conditions of Azure AD Managed Identity support
|
|||
--DESCRIPTION--
|
||||
This test expects certain exceptions to be thrown under some conditions.
|
||||
--SKIPIF--
|
||||
<?php require('skipif.inc');?>
|
||||
<?php
|
||||
require('skipif.inc');
|
||||
require('skipif_Appveyor.inc');
|
||||
require('skipif_unix.inc');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
require_once("MsCommon_mid-refactor.inc");
|
||||
|
@ -41,7 +45,9 @@ function connectInvalidServer()
|
|||
$conn = new PDO("sqlsrv:server = invalidServer; $connectionInfo", null, null);
|
||||
echo $message . $testCase . PHP_EOL;
|
||||
} catch(PDOException $e) {
|
||||
// TODO: check the exception message here
|
||||
echo "Failed to connect\n";
|
||||
print_r($e->getMessage());
|
||||
echo "\n";
|
||||
}
|
||||
} catch(PDOException $e) {
|
||||
print_r($e->getMessage());
|
||||
|
@ -72,7 +78,9 @@ function connectInvalidServerWithUser()
|
|||
$conn = new PDO("sqlsrv:server = invalidServer; $connectionInfo", $user, null);
|
||||
echo $message . $testCase . PHP_EOL;
|
||||
} catch(PDOException $e) {
|
||||
// TODO: check the exception message here
|
||||
echo "Failed to connect\n";
|
||||
print_r($e->getMessage());
|
||||
echo "\n";
|
||||
}
|
||||
} catch(PDOException $e) {
|
||||
print_r($e->getMessage());
|
||||
|
|
4
test/functional/pdo_sqlsrv/skipif_Appveyor.inc
Normal file
4
test/functional/pdo_sqlsrv/skipif_Appveyor.inc
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?php
|
||||
if (getenv('APPVEYOR')) {
|
||||
die("skip Appveyor pipeline");
|
||||
}
|
Loading…
Reference in a new issue