Skip to content

Commit 9bfe278

Browse files
committed
[skip travis] 20230628 Work on #216
1 parent 824fd52 commit 9bfe278

16 files changed

+59
-0
lines changed

tests/php/base_qry_commonspTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ public static function setUpBeforeClass() {
7979
require('./tests/phpcommon/DB.mysql.RI.php');
8080
}elseif( $DB == 'postgres' ){
8181
require('./tests/phpcommon/DB.pgsql.php');
82+
}elseif( $DB == 'mssql' ){
83+
require('./tests/phpcommon/DB.mssql.php');
8284
}else{
8385
self::markTestSkipped("CI Support unavialable for DB: $DB.");
8486
}

tests/php/iauthTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ public static function setUpBeforeClass(){
6262
require('./tests/phpcommon/DB.mysql.RI.php');
6363
}elseif( $DB == 'postgres' ){
6464
require('./tests/phpcommon/DB.pgsql.php');
65+
}elseif( $DB == 'mssql' ){
66+
require('./tests/phpcommon/DB.mssql.php');
6567
}else{
6668
self::markTestSkipped("CI Support unavialable for DB: $DB.");
6769
}

tests/php/iauth_AuthorizedxTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ public static function setUpBeforeClass() {
6868
require('./tests/phpcommon/DB.mysql.RI.php');
6969
}elseif( $DB == 'postgres' ){
7070
require('./tests/phpcommon/DB.pgsql.php');
71+
}elseif( $DB == 'mssql' ){
72+
require('./tests/phpcommon/DB.mssql.php');
7173
}else{
7274
self::markTestSkipped("CI Support unavialable for DB: $DB.");
7375
}

tests/php/idbTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ public static function setUpBeforeClass() {
6464
require('./tests/phpcommon/DB.mysql.RI.php');
6565
}elseif( $DB == 'postgres' ){
6666
require('./tests/phpcommon/DB.pgsql.php');
67+
}elseif( $DB == 'mssql' ){
68+
require('./tests/phpcommon/DB.mssql.php');
6769
}else{
6870
self::markTestSkipped("CI Support unavialable for DB: $DB.");
6971
}

tests/php/idbspTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ public static function setUpBeforeClass() {
5353
require('./tests/phpcommon/DB.mysql.RI.php');
5454
}elseif( $DB == 'postgres' ){
5555
require('./tests/phpcommon/DB.pgsql.php');
56+
}elseif( $DB == 'mssql' ){
57+
require('./tests/phpcommon/DB.mssql.php');
5658
}else{
5759
self::markTestSkipped("CI Support unavialable for DB: $DB.");
5860
}

tests/php/ilog_timingTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ public static function setUpBeforeClass(){
5959
require('./tests/phpcommon/DB.mysql.RI.php');
6060
}elseif( $DB == 'postgres' ){
6161
require('./tests/phpcommon/DB.pgsql.php');
62+
}elseif( $DB == 'mssql' ){
63+
require('./tests/phpcommon/DB.mssql.php');
6264
}else{
6365
self::markTestSkipped("CI Support unavialable for DB: $DB.");
6466
}

tests/php/ilog_timingspTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ public static function setUpBeforeClass() {
6767
require('./tests/phpcommon/DB.mysql.RI.php');
6868
}elseif( $DB == 'postgres' ){
6969
require('./tests/phpcommon/DB.pgsql.php');
70+
}elseif( $DB == 'mssql' ){
71+
require('./tests/phpcommon/DB.mssql.php');
7072
}else{
7173
self::markTestSkipped("CI Support unavialable for DB: $DB.");
7274
}

tests/php/inetspTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ public static function setUpBeforeClass() {
5151
require('./tests/phpcommon/DB.mysql.RI.php');
5252
}elseif( $DB == 'postgres' ){
5353
require('./tests/phpcommon/DB.pgsql.php');
54+
}elseif( $DB == 'mssql' ){
55+
require('./tests/phpcommon/DB.mssql.php');
5456
}else{
5557
self::markTestSkipped("CI Support unavialable for DB: $DB.");
5658
}

tests/php/ioutput_htmlspTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ public static function setUpBeforeClass() {
8181
require('./tests/phpcommon/DB.mysql.RI.php');
8282
}elseif( $DB == 'postgres' ){
8383
require('./tests/phpcommon/DB.pgsql.php');
84+
}elseif( $DB == 'mssql' ){
85+
require('./tests/phpcommon/DB.mssql.php');
8486
}else{
8587
self::markTestSkipped("CI Support unavialable for DB: $DB.");
8688
}

tests/php/istate_citemsTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ public static function setUpBeforeClass() {
6666
require('./tests/phpcommon/DB.mysql.RI.php');
6767
}elseif( $DB == 'postgres' ){
6868
require('./tests/phpcommon/DB.pgsql.php');
69+
}elseif( $DB == 'mssql' ){
70+
require('./tests/phpcommon/DB.mssql.php');
6971
}else{
7072
self::markTestSkipped("CI Support unavialable for DB: $DB.");
7173
}

tests/php/istate_citemsspTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ public static function setUpBeforeClass() {
7474
require('./tests/phpcommon/DB.mysql.RI.php');
7575
}elseif( $DB == 'postgres' ){
7676
require('./tests/phpcommon/DB.pgsql.php');
77+
}elseif( $DB == 'mssql' ){
78+
require('./tests/phpcommon/DB.mssql.php');
7779
}else{
7880
self::markTestSkipped("CI Support unavialable for DB: $DB.");
7981
}

tests/php/istate_commonTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ public static function setUpBeforeClass() {
5858
require('./tests/phpcommon/DB.mysql.RI.php');
5959
}elseif( $DB == 'postgres' ){
6060
require('./tests/phpcommon/DB.pgsql.php');
61+
}elseif( $DB == 'mssql' ){
62+
require('./tests/phpcommon/DB.mssql.php');
6163
}else{
6264
self::markTestSkipped("CI Support unavialable for DB: $DB.");
6365
}

tests/phpcommon/DB.mssql.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
$alert_user='travis';
3+
$alert_password='';
4+
$alert_dbname='testpig';
5+
$alert_port='1433';
6+
$DBtype='mssql';
7+
$archive_exists = 0;
8+
$archive_dbname = '';
9+
$archive_host = '';
10+
$archive_port = '';
11+
$archive_user = '';
12+
$archive_password = '';
13+
$TRAVIS = getenv('TRAVIS');
14+
if( !$TRAVIS ){ // Running on Local Test System.
15+
$alert_host='db';
16+
require('../dbbasedev.php');
17+
}else{
18+
$alert_host='localhost';
19+
}
20+
?>

tests/setupdb.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ elif [ "$DB" = "mysql" ]; then
4242
echo "Creating $DB Database $DBNNRI using MyISAM SE."
4343
mysql -h $DBS -u travis $OPT -e "CREATE DATABASE IF NOT EXISTS $DBNNRI;"
4444
mysql -h $DBS -u travis $OPT -D $DBNNRI < tests/phpcommon/DB.mysql.MyISAM.sql
45+
elif [ "$DB" = "mssql" ]; then
46+
echo "Creating $DB Database $DBN."
47+
echo "NOOp placeholder for MsSQL CLI."
48+
echo "Creating SNORT Tables."
49+
echo "NOOp placeholder for MsSQL CLI."
50+
echo "Creating BASE Tables."
51+
echo "NOOp placeholder for MsSQL CLI."
52+
echo "Adding referential integrity to the database schema."
53+
echo "NOOp placeholder for MsSQL CLI."
4554
else
4655
echo "Not Setting up Database."
4756
fi

tests/setuptestdb.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
}elseif( $DB == 'postgres' ){
3737
$DBT = array('testpig');
3838
require('./tests/phpcommon/DB.pgsql.php');
39+
}elseif( $DB == 'mssql' ){
40+
$DBT = array('testpig');
41+
require('./tests/phpcommon/DB.mssql.php');
3942
}else{
4043
self::markTestSkipped("CI Support unavialable for DB: $DB.");
4144
}

tests/teardowntestdb.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
}elseif( $DB == 'postgres' ){
3737
$DBT = array('testpig');
3838
require('./tests/phpcommon/DB.pgsql.php');
39+
}elseif( $DB == 'mssql' ){
40+
$DBT = array('testpig');
41+
require('./tests/phpcommon/DB.mssql.php');
3942
}else{
4043
self::markTestSkipped("CI Support unavialable for DB: $DB.");
4144
}

0 commit comments

Comments
 (0)