ci: disable integration tests

This commit is contained in:
Matthew Penner 2021-01-10 12:02:01 -07:00
parent 6bb4f6cd01
commit 166221be9b
3 changed files with 11 additions and 8 deletions

View file

@ -59,9 +59,9 @@ jobs:
env:
DB_CONNECTION: testing
TESTING_DB_HOST: UNIT_NO_DB
- name: execute integration tests
run: vendor/bin/phpunit tests/Integration
if: ${{ always() }}
env:
TESTING_DB_PORT: ${{ job.services.mysql.ports[3306] }}
TESTING_DB_USERNAME: root
# - name: execute integration tests
# run: vendor/bin/phpunit tests/Integration
# if: ${{ always() }}
# env:
# TESTING_DB_PORT: ${{ job.services.mysql.ports[3306] }}
# TESTING_DB_USERNAME: root

View file

@ -199,6 +199,7 @@ class Node extends Model
* Helper function to return the decrypted key for a node.
*
* @return string
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*/
public function getDecryptedKey(): string
{

View file

@ -22,9 +22,10 @@ trait CreatesTestModels
* The returned server model will have all of the relationships loaded onto it.
*
* @param array $attributes
* @return \Pterodactyl\Models\Server
*
* @return \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Builder[]|\Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model|\Pterodactyl\Models\Server
*/
public function createServerModel(array $attributes = []): Server
public function createServerModel(array $attributes = [])
{
/** @var \Illuminate\Database\Eloquent\Factory $factory */
$factory = $this->app->make(EloquentFactory::class);
@ -69,6 +70,7 @@ trait CreatesTestModels
unset($attributes['user_id'], $attributes['location_id']);
/** @var \Pterodactyl\Models\Server $server */
$server = $factory->of(Server::class)->create($attributes);
Allocation::query()->where('id', $server->allocation_id)->update(['server_id' => $server->id]);