From ce0e9b7ded579c620593fe71745e5e6995fec8c3 Mon Sep 17 00:00:00 2001
From: Omar Kamel <30291302+TekExplorer@users.noreply.github.com>
Date: Sun, 6 Dec 2020 13:17:47 -0500
Subject: [PATCH 1/3] Correct JDBC typo
from `JBDC CONNECTION STRING` > `JDBC CONNECTION STRING`
---
resources/scripts/components/server/databases/DatabaseRow.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/resources/scripts/components/server/databases/DatabaseRow.tsx b/resources/scripts/components/server/databases/DatabaseRow.tsx
index 3eeaa981e..952a7b746 100644
--- a/resources/scripts/components/server/databases/DatabaseRow.tsx
+++ b/resources/scripts/components/server/databases/DatabaseRow.tsx
@@ -131,7 +131,7 @@ export default ({ database, className }: Props) => {
-
+
Date: Sun, 6 Dec 2020 10:53:36 -0800
Subject: [PATCH 2/3] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index ace35378b..418135fa3 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@ I would like to extend my sincere thanks to the following sponsors for helping f
| [**MineStrator**](https://minestrator.com/) | Looking for a French highend hosting company for you minecraft server? More than 14,000 members on our discord, trust us. |
| [**DedicatedMC**](https://dedicatedmc.io/) | DedicatedMC provides Raw Power hosting at affordable pricing, making sure to never compromise on your performance and giving you the best performance money can buy. |
| [**Skynode**](https://www.skynode.pro/) | Skynode provides blazing fast game servers along with a top-notch user experience. Whatever our clients are looking for, we're able to provide it! |
-| [**XCORE-SERVER.de**](https://xcore-server.de/) | XCORE-SERVER.de offers High-End Servers for hosting and gaming since 2012. Fast, excellent and well-known for eSports Gaming. |
+| [**XCORE**](https://xcore-server.de/) | XCORE offers High-End Servers for hosting and gaming since 2012. Fast, excellent and well-known for eSports Gaming. |
| [**RoyaleHosting**](https://royalehosting.net/) | Build your dreams and deploy them with RoyaleHosting’s reliable servers and network. Easy to use, provisioned in a couple of minutes. |
| [**Spill Hosting**](https://spillhosting.no/) | Spill Hosting is a Norwegian hosting service, which aims to cheap services on quality servers. Premium i9-9900K processors will run your game like a dream. |
| [**DeinServerHost**](https://deinserverhost.de/) | DeinServerHost offers Dedicated, vps and Gameservers for many popular Games like Minecraft and Rust in Germany since 2013. |
From 8a97b73a6ccab355be4e5e63b0d6a55a591e2338 Mon Sep 17 00:00:00 2001
From: Dane Everitt
Date: Sun, 6 Dec 2020 11:25:26 -0800
Subject: [PATCH 3/3] Fix failing tests
---
.../Server/BulkPowerActionCommandTest.php | 161 ------------------
1 file changed, 161 deletions(-)
delete mode 100644 tests/Unit/Commands/Server/BulkPowerActionCommandTest.php
diff --git a/tests/Unit/Commands/Server/BulkPowerActionCommandTest.php b/tests/Unit/Commands/Server/BulkPowerActionCommandTest.php
deleted file mode 100644
index 92d42ed72..000000000
--- a/tests/Unit/Commands/Server/BulkPowerActionCommandTest.php
+++ /dev/null
@@ -1,161 +0,0 @@
-powerRepository = m::mock(DaemonPowerRepository::class);
- $this->repository = m::mock(ServerRepositoryInterface::class);
- }
-
- /**
- * Test that an action can be sent to all servers.
- */
- public function testSendAction()
- {
- /** @var \Pterodactyl\Models\Server[] $servers */
- $servers = factory(Server::class)->times(2)->make();
-
- foreach ($servers as &$server) {
- $server->setRelation('node', factory(Node::class)->make());
- }
-
- $this->repository->expects('getServersForPowerActionCount')->with([], [])->andReturn(2);
- $this->repository->expects('getServersForPowerAction')->with([], [])->andReturn($servers);
-
- for ($i = 0; $i < count($servers); $i++) {
- $this->powerRepository->expects('setServer->send')->with('kill')->andReturnNull();
- }
-
- $display = $this->runCommand($this->getCommand(), ['action' => 'kill'], ['yes']);
-
- $this->assertNotEmpty($display);
- $this->assertStringContainsString('2/2', $display);
- $this->assertStringContainsString(trans('command/messages.server.power.confirm', ['action' => 'kill', 'count' => 2]), $display);
- }
-
- /**
- * Test filtering servers and nodes.
- */
- public function testSendWithFilters()
- {
- $server = factory(Server::class)->make();
- $server->setRelation('node', $node = factory(Node::class)->make());
-
- $this->repository->expects('getServersForPowerActionCount')
- ->with([1, 2], [3, 4])
- ->andReturn(1);
-
- $this->repository->expects('getServersForPowerAction')
- ->with([1, 2], [3, 4])
- ->andReturn(Collection::make([$server]));
-
- $this->powerRepository->expects('setNode')->with($node)->andReturnSelf();
- $this->powerRepository->expects('setServer')->with($server)->andReturnSelf();
- $this->powerRepository->expects('send')->with('kill')->andReturn(new Response);
-
- $display = $this->runCommand($this->getCommand(), [
- 'action' => 'kill',
- '--servers' => '1,2',
- '--nodes' => '3,4',
- ], ['yes']);
-
- $this->assertNotEmpty($display);
- $this->assertStringContainsString('1/1', $display);
- $this->assertStringContainsString(trans('command/messages.server.power.confirm', ['action' => 'kill', 'count' => 1]), $display);
- }
-
- /**
- * Test that sending empty options returns the expected results.
- */
- public function testSendWithEmptyOptions()
- {
- $server = factory(Server::class)->make();
- $server->setRelation('node', factory(Node::class)->make());
-
- $this->repository->expects('getServersForPowerActionCount')
- ->with([], [])
- ->andReturn(1);
-
- $this->repository->expects('getServersForPowerAction')->with([], [])->andReturn(Collection::make([$server]));
- $this->powerRepository->expects('setServer->send')->with('kill')->andReturnNull();
-
- $display = $this->runCommand($this->getCommand(), [
- 'action' => 'kill',
- '--servers' => '',
- '--nodes' => '',
- ], ['yes']);
-
- $this->assertNotEmpty($display);
- $this->assertStringContainsString('1/1', $display);
- $this->assertStringContainsString(trans('command/messages.server.power.confirm', ['action' => 'kill', 'count' => 1]), $display);
- }
-
- /**
- * Test that validation occurs correctly.
- *
- * @param array $data
- *
- * @dataProvider validationFailureDataProvider
- */
- public function testValidationErrors(array $data)
- {
- $this->expectException(ValidationException::class);
- $this->runCommand($this->getCommand(), $data);
- }
-
- /**
- * Provide invalid data for the command.
- *
- * @return array
- */
- public function validationFailureDataProvider(): array
- {
- return [
- [['action' => 'hodor']],
- [['action' => 'hodor', '--servers' => 'hodor']],
- [['action' => 'kill', '--servers' => 'hodor']],
- [['action' => 'kill', '--servers' => '1,2,3', '--nodes' => 'hodor']],
- [['action' => 'kill', '--servers' => '1,2,3', '--nodes' => '1,2,test']],
- ];
- }
-
- /**
- * Return an instance of the command with mocked dependencies.
- *
- * @return \Pterodactyl\Console\Commands\Server\BulkPowerActionCommand
- */
- private function getCommand(): BulkPowerActionCommand
- {
- return new BulkPowerActionCommand($this->powerRepository, $this->repository, $this->app->make(Factory::class));
- }
-}