Skip to content

Commit dd0ea5c

Browse files
authored
Merge pull request #282 from prab18hat/fix-certificate-validation-unused-variable
Remove unused WPT_CERTIFICATE_VALIDATION environment variable
2 parents 7d63dba + 7ea1776 commit dd0ea5c

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

functions.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ function check_required_env( $check_db = true ) {
6363
* inner blocks were found.
6464
* @type string $WPT_RM_TEST_DIR_CMD Command for removing the test directory.
6565
* @type string $WPT_REPORT_API_KEY API key for submitting test results.
66-
* @type bool $WPT_CERTIFICATE_VALIDATION Whether to validate TLS certificates. Default true.
6766
* @type bool $WPT_DEBUG_MODE Whether debug mode is enabled.
6867
* }
6968
* }
@@ -74,15 +73,7 @@ function setup_runner_env_vars() {
7473
'WPT_TEST_DIR' => trim( getenv( 'WPT_TEST_DIR' ) ) ?: '/tmp/wp-test-runner',
7574
);
7675

77-
/*
78-
* When no value is provided for WPT_CERTIFICATE_VALIDATION, assume that the default of true (validate certificates)
79-
* is desired.
80-
*/
81-
if ( false === getenv( 'WPT_CERTIFICATE_VALIDATION' ) ) {
82-
$runner_configuration['WPT_CERTIFICATE_VALIDATION'] = true;
83-
} else {
84-
$runner_configuration['WPT_CERTIFICATE_VALIDATION'] = (bool) getenv( 'WPT_CERTIFICATE_VALIDATION' );
85-
}
76+
8677

8778
return array_merge(
8879
$runner_configuration,

prepare.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,6 @@
6868

6969
}
7070

71-
/**
72-
* Don't validate the TLS certificate
73-
* Useful for local environments
74-
*/
75-
$certificate_validation = '';
76-
if( ! $runner_vars['WPT_CERTIFICATE_VALIDATION'] ) {
77-
$certificate_validation .= ' --no-check-certificate';
78-
}
7971

8072
/**
8173
* Performs a series of operations to set up the test environment. This includes creating a preparation directory,

0 commit comments

Comments
 (0)