-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #787 from gettakaro/keep-track-of-cached-reachabil…
…ity-status-for-servers
- Loading branch information
Showing
9 changed files
with
122 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
packages/lib-db/src/migrations/sql/20231224135126-gameserver-online-status.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Knex } from 'knex'; | ||
|
||
export async function up(knex: Knex): Promise<void> { | ||
await knex.schema.alterTable('gameservers', (table) => { | ||
table.boolean('reachable').defaultTo(true); | ||
}); | ||
} | ||
|
||
export async function down(knex: Knex): Promise<void> { | ||
await knex.schema.alterTable('gameservers', (table) => { | ||
table.dropColumn('reachable'); | ||
}); | ||
} |
14 changes: 7 additions & 7 deletions
14
packages/test/src/__snapshots__/GameServerController/Create.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
{ | ||
"body": { | ||
"meta": { | ||
"serverTime": "2022-09-13T19:27:39.651Z" | ||
}, | ||
"meta": {}, | ||
"data": { | ||
"id": "59f2cdbf-ef7d-495f-be9e-531d4fd6ee29", | ||
"createdAt": "2023-12-24T15:22:57.559Z", | ||
"updatedAt": "2023-12-24T15:22:57.559Z", | ||
"name": "Test gameserver", | ||
"connectionInfo": { | ||
"host": "http://takaro:3002" | ||
}, | ||
"type": "MOCK", | ||
"createdAt": "2022-09-13T19:27:39.649Z", | ||
"updatedAt": "2022-09-13T19:27:39.650Z", | ||
"id": "abc10e29-6aee-48c0-b0cf-4ff1f6017770" | ||
"reachable": true | ||
} | ||
}, | ||
"status": 200, | ||
"test": { | ||
"group": "GameServerController", | ||
"snapshot": true, | ||
"name": "Create", | ||
"expectedStatus": 200, | ||
"filteredFields": [ | ||
"connectionInfo" | ||
], | ||
"expectedStatus": 200, | ||
"standardEnvironment": true | ||
} | ||
} |
18 changes: 9 additions & 9 deletions
18
packages/test/src/__snapshots__/GameServerController/Get by ID.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
{ | ||
"body": { | ||
"meta": { | ||
"serverTime": "2022-09-13T19:27:39.353Z" | ||
}, | ||
"meta": {}, | ||
"data": { | ||
"createdAt": "2022-09-13T19:27:39.342Z", | ||
"updatedAt": "2022-09-13T19:27:39.343Z", | ||
"id": "4bca3c37-b82a-47fc-80e4-096e27758804", | ||
"id": "2600aac2-d5b8-455d-bf6a-12a242f5ee0a", | ||
"createdAt": "2023-12-24T15:22:57.034Z", | ||
"updatedAt": "2023-12-24T15:22:57.034Z", | ||
"name": "Test gameserver", | ||
"type": "MOCK", | ||
"connectionInfo": { | ||
"host": "http://takaro:3002" | ||
} | ||
}, | ||
"type": "MOCK", | ||
"reachable": true | ||
} | ||
}, | ||
"status": 200, | ||
"test": { | ||
"group": "GameServerController", | ||
"snapshot": true, | ||
"name": "Get by ID", | ||
"expectedStatus": 200, | ||
"filteredFields": [ | ||
"connectionInfo" | ||
], | ||
"expectedStatus": 200, | ||
"standardEnvironment": true | ||
} | ||
} |
12 changes: 6 additions & 6 deletions
12
packages/test/src/__snapshots__/GameServerController/Update.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters