Skip to content

Skipped some tests when running against Azure #874

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/functional/pdo_sqlsrv/PDO81_MemoryCheck.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ emalloc (which only allocate memory in the memory space allocated for the PHP pr
--ENV--
PHPT_EXEC=true
--SKIPIF--
<?php require('skipif.inc'); ?>
<?php require('skipif_azure.inc'); ?>
--FILE--
<?php
include 'MsCommon.inc';
Expand Down
2 changes: 1 addition & 1 deletion test/functional/pdo_sqlsrv/issue_52_pdo.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ verify github issue52 is fixed.
This test only works in previous versions of SQL Servers. Full-text search features are
deprecated starting in SQL Server 2016.
--SKIPIF--
<?php require('skipif.inc'); ?>
<?php require('skipif_azure.inc'); ?>
--FILE--
<?php
require_once 'MsCommon.inc';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
--TEST--
Test connection keywords for Azure Key Vault for Always Encrypted.
--SKIPIF--
<?php require('skipif_mid-refactor.inc'); ?>
<?php require('skipif_azure.inc');
require('skipif_mid-refactor.inc'); ?>
--FILE--
<?php
require_once('pdo_ae_azure_key_vault_common.php');
Expand Down
12 changes: 12 additions & 0 deletions test/functional/sqlsrv/MsCommon.inc
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,10 @@ function handleErrors()

function setUSAnsiLocale()
{
// Do not run locale tests in Azure
if (isDaasMode()) {
return;
}
if (!isWindows()) {
// macOS the locale names are different in Linux or macOS
$locale = strtoupper(PHP_OS) === 'LINUX' ? "en_US.ISO-8859-1" : "en_US.ISO8859-1";
Expand All @@ -459,6 +463,10 @@ function setUSAnsiLocale()

function resetLocaleToDefault()
{
// Do not run locale tests in Azure
if (isDaasMode()) {
return;
}
// Like setUSAnsiLocale() above, this method is only needed in non-Windows environment
if (!isWindows()) {
setlocale(LC_ALL, null);
Expand All @@ -472,6 +480,10 @@ function isLocaleSupported()
if (isWindows()) {
return true;
}
// Do not run locale tests in Azure
if (isDaasMode()) {
return false;
}
if (AE\isDataEncrypted()) {
return false;
}
Expand Down
3 changes: 2 additions & 1 deletion test/functional/sqlsrv/TC81_MemoryCheck.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ emalloc (which only allocate memory in the memory space allocated for the PHP pr
--ENV--
PHPT_EXEC=true
--SKIPIF--
<?php require('skipif_versions_old.inc'); ?>
<?php require('skipif_azure.inc');
require('skipif_versions_old.inc'); ?>
--FILE--
<?php
require_once('MsCommon.inc');
Expand Down
2 changes: 1 addition & 1 deletion test/functional/sqlsrv/issue_52.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ verify github issue52 is fixed.
This test only works in previous versions of SQL Servers. Full-text search features are
deprecated starting in SQL Server 2016.
--SKIPIF--
<?php require('skipif.inc'); ?>
<?php require('skipif_azure.inc'); ?>
--FILE--
<?php

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
--TEST--
Test connection keywords for Azure Key Vault for Always Encrypted.
--SKIPIF--
<?php require('skipif_versions_old.inc'); ?>
<?php require('skipif_azure.inc');
require('skipif_versions_old.inc'); ?>
--FILE--
<?php
require_once('sqlsrv_ae_azure_key_vault_common.php');
Expand Down
2 changes: 1 addition & 1 deletion test/functional/sqlsrv/sqlsrv_azure_ad_authentication.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ $azurePassword = $adPassword;
if ($azureServer != 'TARGET_AD_SERVER')
{
$connectionInfo = array( "UID"=>$azureUsername, "PWD"=>$azurePassword,
"Authentication"=>'ActiveDirectoryPassword', "TrustServerCertificate"=>true );
"Authentication"=>'ActiveDirectoryPassword', "TrustServerCertificate"=>false );

$conn = sqlsrv_connect( $azureServer, $connectionInfo );
if( $conn === false )
Expand Down