Skip to content

Commit

Permalink
disable sqlite in linux all disable
Browse files Browse the repository at this point in the history
  • Loading branch information
goatshriek committed Oct 29, 2023
1 parent ebd6c35 commit aeae2a2
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ jobs:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: Configure
run: |
cmake -DCOVERAGE=ON -DCMAKE_BUILD_TYPE=Debug -DENABLE_JOURNALD_TARGETS=OFF -DENABLE_NETWORK_TARGETS=OFF -DENABLE_SOCKET_TARGETS=OFF -DENABLE_WINDOWS_EVENT_LOG_TARGETS=OFF -DENABLE_THREAD_SAFETY=OFF .
cmake -DCOVERAGE=ON -DCMAKE_BUILD_TYPE=Debug -DENABLE_JOURNALD_TARGETS=OFF -DENABLE_NETWORK_TARGETS=OFF -DENABLE_SOCKET_TARGETS=OFF -DENABLE_SQLITE3_TARGETS=OFF -DENABLE_WINDOWS_EVENT_LOG_TARGETS=OFF -DENABLE_THREAD_SAFETY=OFF .
- name: Build
run: |
make all
Expand Down
55 changes: 42 additions & 13 deletions test/function/target/sqlite3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ namespace {
int actual_prival;
int actual_version;
const unsigned char *timestamp;
const unsigned char *hostname;
const char *actual_hostname;
const unsigned char *app_name;
const char *actual_app_name;
const unsigned char *procid;
const char *actual_procid;
const unsigned char *msgid;
const char *actual_msgid;
const unsigned char *structured_data;

add_result = stumpless_add_entry( target, basic_entry );
EXPECT_GE( add_result, 0 );
Expand Down Expand Up @@ -103,19 +112,39 @@ namespace {

timestamp = sqlite3_column_text( result_stmt, 2 );
EXPECT_NOT_NULL( timestamp );
TestRFC5424Timestamp( reinterpret_cast<char const *>( timestamp ) );

// hostname

// app_name

// procid

// msgid

// structured data

// message
TestRFC5424Timestamp( reinterpret_cast<const char *>( timestamp ) );

hostname = sqlite3_column_text( result_stmt, 3 );
EXPECT_NOT_NULL( hostname );
actual_hostname = stumpless_get_entry_hostname( basic_entry );
EXPECT_NOT_NULL( actual_hostname );
EXPECT_STREQ( ( const char * ) hostname, actual_hostname );
free( ( void * ) actual_hostname );

app_name = sqlite3_column_text( result_stmt, 4 );
EXPECT_NOT_NULL( app_name );
actual_app_name = stumpless_get_entry_app_name( basic_entry );
EXPECT_NOT_NULL( actual_app_name );
EXPECT_STREQ( ( const char * ) app_name, actual_app_name );
free( ( void * ) actual_app_name );

procid = sqlite3_column_text( result_stmt, 5 );
EXPECT_NOT_NULL( procid );
actual_procid = stumpless_get_entry_procid( basic_entry );
EXPECT_NOT_NULL( actual_procid );
EXPECT_STREQ( ( const char * ) procid, actual_procid );
free( ( void * ) actual_procid );

msgid = sqlite3_column_text( result_stmt, 6 );
EXPECT_NOT_NULL( msgid );
actual_msgid = stumpless_get_entry_msgid( basic_entry );
EXPECT_NOT_NULL( actual_msgid );
EXPECT_STREQ( ( const char * ) msgid, actual_msgid );
free( ( void * ) actual_msgid );

structured_data = sqlite3_column_text( result_stmt, 7 );
EXPECT_NOT_NULL( structured_data );
TestRFC5424StructuredData( reinterpret_cast<const char *>( structured_data ) );

sqlite3_finalize( result_stmt );
free( ( void * ) expected_message );
Expand Down

0 comments on commit aeae2a2

Please sign in to comment.