File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -50,21 +50,22 @@ pub async fn get_database_connection() -> Result<DatabaseConnection, DbErr> {
50
50
Err ( DbErr :: Custom ( "Database connection is not established" . into ( ) ) )
51
51
}
52
52
}
53
+
54
+ /**
55
+ * Sets up the initial test environment (database connection and env variables)
56
+ */
57
+ pub async fn setup_test_environment ( ) {
58
+ init ( ) ;
59
+ setup ( ) . await . expect ( "Failed to setup database connection." ) ;
60
+ }
61
+
53
62
#[ cfg( test) ]
54
63
mod tests {
55
64
56
65
use super :: * ;
57
66
use tokio;
58
67
use serial_test:: serial;
59
68
60
- /**
61
- * Sets up the initial test environment (database connection and env variables)
62
- */
63
- async fn setup_test_environment ( ) {
64
- init ( ) ;
65
- setup ( ) . await . expect ( "Failed to setup database connection." ) ;
66
- }
67
-
68
69
/**
69
70
* Test the establish_connection function
70
71
*
Original file line number Diff line number Diff line change @@ -2107,7 +2107,7 @@ mod tests {
2107
2107
log:: info!( "Starting end-to-end test" ) ;
2108
2108
2109
2109
// Test Creating an application
2110
- let _ = fplus_database:: setup ( ) . await ;
2110
+ let _ = fplus_database:: setup_test_environment ( ) . await ;
2111
2111
let gh = github_async_new ( OWNER . to_string ( ) , REPO . to_string ( ) ) . await ;
2112
2112
2113
2113
log:: info!( "Creating a new LDNApplication from issue" ) ;
You can’t perform that action at this time.
0 commit comments