Skip to content

Commit

Permalink
MDL-53516 search: Remove file index unit test disable flag
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmerrill committed Mar 29, 2016
1 parent 7a3bc40 commit 8dfc629
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions search/engine/solr/tests/engine_test.php
Expand Up @@ -23,7 +23,6 @@
* - define('TEST_SEARCH_SOLR_INDEXNAME', 'unittest');
*
* Optional params:
* - define('TEST_SEARCH_SOLR_DISABLE_FILE_INDEXING', 1);
* - define('TEST_SEARCH_SOLR_USERNAME', '');
* - define('TEST_SEARCH_SOLR_PASSWORD', '');
* - define('TEST_SEARCH_SOLR_SSLCERT', '');
Expand Down Expand Up @@ -100,11 +99,7 @@ public function setUp() {
set_config('ssl_cainfo', TEST_SEARCH_SOLR_CAINFOCERT, 'search_solr');
}

if (defined('TEST_SEARCH_SOLR_DISABLE_FILE_INDEXING') && (TEST_SEARCH_SOLR_DISABLE_FILE_INDEXING == 1)) {
set_config('fileindexing', 0, 'search_solr');
} else {
set_config('fileindexing', 1, 'search_solr');
}
set_config('fileindexing', 1, 'search_solr');

// We are only test indexing small string files, so setting this as low as we can.
set_config('maxindexfilekb', 1, 'search_solr');
Expand Down Expand Up @@ -309,11 +304,6 @@ public function test_highlight() {
}

public function test_index_file() {
if (defined('TEST_SEARCH_SOLR_DISABLE_FILE_INDEXING') && (TEST_SEARCH_SOLR_DISABLE_FILE_INDEXING == 1)) {
$this->markTestSkipped('Solr file indexing not enabled.');
return;
}

// Very simple test.
$this->search->index();
$querydata = new stdClass();
Expand All @@ -323,11 +313,6 @@ public function test_index_file() {
}

public function test_reindexing_files() {
if (defined('TEST_SEARCH_SOLR_DISABLE_FILE_INDEXING') && (TEST_SEARCH_SOLR_DISABLE_FILE_INDEXING == 1)) {
$this->markTestSkipped('Solr file indexing not enabled.');
return;
}

// Get engine and area to work with.
$engine = $this->search->get_engine();
$areaid = \core_search\manager::generate_areaid('core_mocksearch', 'role_capabilities');
Expand Down Expand Up @@ -429,11 +414,6 @@ public function test_reindexing_files() {
}

public function test_index_filtered_file() {
if (defined('TEST_SEARCH_SOLR_DISABLE_FILE_INDEXING') && (TEST_SEARCH_SOLR_DISABLE_FILE_INDEXING == 1)) {
$this->markTestSkipped('Solr file indexing not enabled.');
return;
}

// Get engine and area to work with.
$engine = $this->search->get_engine();
$areaid = \core_search\manager::generate_areaid('core_mocksearch', 'role_capabilities');
Expand Down Expand Up @@ -497,11 +477,6 @@ public function test_index_filtered_file() {
}

public function test_delete_by_id() {
if (defined('TEST_SEARCH_SOLR_DISABLE_FILE_INDEXING') && (TEST_SEARCH_SOLR_DISABLE_FILE_INDEXING == 1)) {
$this->markTestSkipped('Solr file indexing not enabled.');
return;
}

// First get files in the index.
$this->search->index();
$engine = $this->search->get_engine();
Expand Down

0 comments on commit 8dfc629

Please sign in to comment.