test: harden match live static contract
This commit is contained in:
@@ -14,7 +14,19 @@ $requiredTokens = [
|
||||
'public static function syncLegacyLiveUrl',
|
||||
'public static function getLiveListForApi',
|
||||
'public static function buildStreamOptions',
|
||||
'source_url',
|
||||
'update_time',
|
||||
"order('create_time', 'asc')",
|
||||
"order('id', 'asc')",
|
||||
'play_url_m3u8',
|
||||
'play_url_hd_m3u8',
|
||||
'play_url_flv',
|
||||
'play_url_hd_flv',
|
||||
'M3U8',
|
||||
'HD M3U8',
|
||||
'FLV',
|
||||
'HD FLV',
|
||||
"if (\$url === '')",
|
||||
'default_play_url',
|
||||
];
|
||||
|
||||
@@ -25,4 +37,9 @@ foreach ($requiredTokens as $needle) {
|
||||
}
|
||||
}
|
||||
|
||||
if (strpos($service, "whereNull('delete_time')") === false && strpos($service, 'SoftDelete') === false) {
|
||||
fwrite(STDERR, "missing non-deleted row guard\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
echo "service static checks passed\n";
|
||||
|
||||
Reference in New Issue
Block a user