Travis Update Finale: Unit Tests + SQL Validation (#13331)

* SQL Validation, the first of many

* Initial test of the world loading

* This was prefixed when it shouldnt have been :v

* This also isnt a valid table

* Escape time

* Chmod

* This **should** work

* Oops

* RUST gone bust

* Please work

* Why did I do this twice

* I think I got it

* Fixes AFK SS

* AAAAAAAAAAAAAAAAAAAAAA

* Fixes AI cam runtime

* Cleanup

* *screams*

* Fare fixes

* Removes un-needed stuff

* I hope this works

* chmoooood

* SQL Version Unit Test

* Failure test

* Kinda ironic how I forgot this

* Task failed successfully

* Moves a global var around

* Bump SQL version in travis

* New test: SQL example DBconfig update

* Lets test an invalid version

* TASK FAILED SUCCESSFULLY

* Programmatic maplist generation

* Removes a duplicate check

* Lets try this

* What about this

* hnnng

* Lets just update BYOND
This commit is contained in:
AffectedArc07
2020-06-27 08:26:58 +01:00
committed by GitHub
parent 30d9be47be
commit 0c8d95dd65
28 changed files with 917 additions and 170 deletions
+6 -3
View File
@@ -809,7 +809,6 @@
/datum/configuration/proc/loadsql(filename) // -- TLE
var/list/Lines = file2list(filename)
var/db_version = 0
for(var/t in Lines)
if(!t) continue
@@ -848,10 +847,13 @@
if("feedback_tableprefix")
sqlfdbktableprefix = value
if("db_version")
db_version = text2num(value)
sql_version = text2num(value)
else
log_config("Unknown setting in configuration: '[name]'")
if(config.sql_enabled && db_version != SQL_VERSION)
// The unit tests have their own version of this check, which wont hold the server up infinitely, so this is disabled if we are running unit tests
#ifndef UNIT_TESTS
if(config.sql_enabled && sql_version != SQL_VERSION)
config.sql_enabled = 0
log_config("WARNING: DB_CONFIG DEFINITION MISMATCH!")
spawn(60)
@@ -859,6 +861,7 @@
SSticker.ticker_going = FALSE
spawn(600)
to_chat(world, "<span class='alert'>DB_CONFIG MISMATCH, ROUND START DELAYED. <BR>Please check database version for recent upstream changes!</span>")
#endif
/datum/configuration/proc/loadoverflowwhitelist(filename)
var/list/Lines = file2list(filename)
+3 -1
View File
@@ -279,7 +279,9 @@ SUBSYSTEM_DEF(ticker)
for(var/mob/new_player/N in GLOB.mob_list)
if(N.client)
N.new_player_panel_proc()
#ifdef UNIT_TESTS
RunUnitTests()
#endif
return 1
/datum/controller/subsystem/ticker/proc/station_explosion_cinematic(station_missed = 0, override = null)