test: setup database for upcoming tests

This commit is contained in:
Andras Bacsai
2024-12-04 12:43:52 +01:00
parent 51ed798789
commit 15ac12e131
8 changed files with 196 additions and 4 deletions

View File

@@ -0,0 +1,22 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
class ApplicationFactory extends Factory
{
public function definition(): array
{
return [
'name' => fake()->unique()->name(),
'destination_id' => 1,
'git_repository' => fake()->url(),
'git_branch' => fake()->word(),
'build_pack' => 'nixpacks',
'ports_exposes' => '3000',
'environment_id' => 1,
'destination_id' => 1,
];
}
}

View File

@@ -0,0 +1,17 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
class ServerFactory extends Factory
{
public function definition(): array
{
return [
'name' => fake()->unique()->name(),
'ip' => fake()->unique()->ipv4(),
'private_key_id' => 1,
];
}
}