Skip to content

Commit

Permalink
Try to fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
kporras07 committed Jan 17, 2024
1 parent c702965 commit e685f11
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/Functional/RedisCommandsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ class RedisCommandsTest extends TerminusTestBase
*/
public function testRedisEnable()
{
// This usually runs right after site plan change, let's sleep for a bit before continuing.
sleep(5);
$this->assertTerminusCommandSucceedsInAttempts(sprintf('redis:enable %s', $this->getSiteName()));
}

Expand Down
9 changes: 8 additions & 1 deletion tests/Functional/SelfCommandsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public function testSelfUpdateCommand()
0 !== $exitCode
&& false !== strpos($error, 'rate limit exceeded')
) {
// @todo: fix CMS-972
$this->markTestSkipped(sprintf('Failed executing %s command: %s', self::SELF_UPDATE_COMMAND, $error));
}

Expand All @@ -44,6 +43,14 @@ public function testSelfUpdateCommand()
'Failed installing plugins to setup self:update command test.'
);
$output = $this->terminus(self::SELF_UPDATE_COMMAND);
[$output, $exitCode, $error] = static::callTerminus(self::SELF_UPDATE_COMMAND);
if (
0 !== $exitCode
&& false !== strpos($error, 'rate limit exceeded')
) {
$this->markTestSkipped(sprintf('Failed executing %s command: %s', self::SELF_UPDATE_COMMAND, $error));
}

$this->assertEquals('No update available', $output);
}
}

0 comments on commit e685f11

Please sign in to comment.