This repository has been archived on 2025-01-04. You can view files and clone it, but cannot push or open issues or pull requests.
lwb6/legacyworlds-server-data/db-structure/tests/user/030-data/150-logs/010-sys-logs.sql

29 lines
681 B
MySQL
Raw Normal View History

/*
* Test privileges on sys.logs
*/
BEGIN;
SELECT plan( 4 );
SELECT diag_test_name( 'sys.logs - INSERT privileges' );
SELECT throws_ok(
$$ INSERT INTO sys.logs( component , level , message )
VALUES ( 'test' , 'WARNING'::log_level , 'test' );
$$ , 42501 );
SELECT diag_test_name( 'sys.logs - UPDATE privileges' );
SELECT throws_ok(
$$ UPDATE sys.logs SET component = 'retest'; $$ ,
42501 );
SELECT diag_test_name( 'sys.logs - SELECT privileges' );
SELECT lives_ok(
$$ SELECT * FROM sys.logs; $$
);
SELECT diag_test_name( 'sys.logs - DELETE privileges' );
SELECT throws_ok(
$$ DELETE FROM sys.logs; $$ ,
42501 );
SELECT * FROM finish( );
ROLLBACK;