SQL unit tests fixes

* Added plan() instead of no_plan() where necessary

* Removed junk from dirty tests system self-check
This commit is contained in:
Emmanuel BENOîT 2012-01-31 12:14:38 +01:00
parent 44b6ec1920
commit ba6a1e2b41
5 changed files with 9 additions and 11 deletions

View file

@ -23,7 +23,7 @@ BEGIN;
SELECT defs.add_resource_records( _get_string( 'test1' ) ); SELECT defs.add_resource_records( _get_string( 'test1' ) );
/***** TESTS BEGIN HERE *****/ /***** TESTS BEGIN HERE *****/
SELECT no_plan( ); SELECT plan( 2 );
SELECT diag_test_name( 'defs.add_resource_records() - Empire record created' ); SELECT diag_test_name( 'defs.add_resource_records() - Empire record created' );
SELECT is( COUNT(*)::INT , 1 ) SELECT is( COUNT(*)::INT , 1 )

View file

@ -21,7 +21,7 @@ BEGIN;
INSERT INTO mset_update VALUES ( 1 , 1 , 0 ) , ( 1 , 2 , 4 ); INSERT INTO mset_update VALUES ( 1 , 1 , 0 ) , ( 1 , 2 , 4 );
/***** TESTS BEGIN HERE *****/ /***** TESTS BEGIN HERE *****/
SELECT no_plan( ); SELECT plan( 8 );
SELECT diag_test_name( 'emp.mset_update_apply() - Applying valid empire update' ); SELECT diag_test_name( 'emp.mset_update_apply() - Applying valid empire update' );
SELECT ok( emp.mset_update_apply( ) ); SELECT ok( emp.mset_update_apply( ) );

View file

@ -11,7 +11,7 @@ BEGIN;
/***** TESTS BEGIN HERE *****/ /***** TESTS BEGIN HERE *****/
SELECT no_plan( ); SELECT plan( 9 );
SELECT diag_test_name( 'sys.gu_pmc_get_data() - Neutral planet without resource providers not included' ); SELECT diag_test_name( 'sys.gu_pmc_get_data() - Neutral planet without resource providers not included' );
SELECT is_empty( $$ SELECT is_empty( $$

View file

@ -42,7 +42,7 @@ BEGIN;
/***** TESTS BEGIN HERE *****/ /***** TESTS BEGIN HERE *****/
SELECT no_plan( ); SELECT plan( 2 );
SELECT sys.process_planet_mining_updates( 0 ); SELECT sys.process_planet_mining_updates( 0 );

View file

@ -4,9 +4,7 @@
* Insert an address, it should exist during the main test. * Insert an address, it should exist during the main test.
*/ */
BEGIN; BEGIN;
SELECT no_plan( ); SELECT plan( 1 );
SELECT pg_advisory_lock( 1 );
SELECT diag_test_name( 'Dirty test system self-check - prepare.sql was executed' ); SELECT diag_test_name( 'Dirty test system self-check - prepare.sql was executed' );
SELECT is( COUNT(*)::INT , 1 ) SELECT is( COUNT(*)::INT , 1 )