Skip to content

Commit

Permalink
new robo drush tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pwtyler committed Nov 13, 2024
1 parent 54ae001 commit 1471742
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ public function testFull(int $drupal_version = 9, string $site_name = NULL) {
// Test creating Solr index.
$this->testSolrIndexCreate($site_name, 'dev');

// Test running the reload
$this->testPantheonSolrReload($site_name, 'dev');
$this->testSolrReload($site_name, 'dev');

// Test select query.
$this->testSolrSelect($site_name, 'dev');

Expand Down Expand Up @@ -802,9 +806,41 @@ public function testSolrIndexCreate(string $site_name, string $env = 'dev') {
if (!$result->wasSuccessful()) {
exit(1);
}
}

public function testPantheonSolrReload(string $site_name, string $env = 'dev') {
$result = $this->taskExec( static::$TERMINUS_EXE )
->args(
'drush',
"$site_name.$env",
'--',
'search-api-pantheon:reloadSchema',
)
->run();
if (!$result->wasSuccessful()) {
exit(1);
}
}

public function testSolrReload(string $site_name, string $env = 'dev') {
$result = $this->taskExec( static::$TERMINUS_EXE )
->args(
'drush',
"$site_name.$env",
'--',
'search-api-solr:reload',
'pantheon_solr8'
)
->run();
if (!$result->wasSuccessful()) {
exit(1);
}
}





/**
* Use search-api-pantheon:select command to ensure both Drupal index and the actual Solr index have the same amount of items.
*
Expand Down

0 comments on commit 1471742

Please sign in to comment.