Skip to content

Commit 44aca51

Browse files
committed
Added serial tests
1 parent 3477c7f commit 44aca51

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

fplus-database/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ chrono = "0.4.26"
2121
once_cell = "1.8"
2222
serde = { version = "1.0.164", features = ["derive", "std",
2323
"serde_derive", "alloc", "rc"] }
24+
serial_test = "3.0.0"
2425

fplus-database/src/lib.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ pub async fn get_database_connection() -> Result<DatabaseConnection, DbErr> {
5454
mod tests {
5555

5656
use super::*;
57-
use sea_orm::entity::*;
5857
use tokio;
58+
use serial_test::serial;
5959

6060
/**
6161
* Sets up the initial test environment (database connection and env variables)
@@ -72,6 +72,7 @@ mod tests {
7272
* @return () - The result of the test
7373
*/
7474
#[tokio::test]
75+
#[serial]
7576
async fn test_establish_connection_with_env_url() {
7677
init();
7778
let connection_result = setup().await;
@@ -85,6 +86,7 @@ mod tests {
8586
* @return () - The result of the test
8687
*/
8788
#[tokio::test]
89+
#[serial]
8890
async fn test_create_allocator() {
8991
setup_test_environment().await;
9092

@@ -118,6 +120,7 @@ mod tests {
118120
* @return () - The result of the test
119121
*/
120122
#[tokio::test]
123+
#[serial]
121124
async fn test_get_allocators() {
122125
setup_test_environment().await;
123126

@@ -132,6 +135,7 @@ mod tests {
132135
* @return () - The result of the test
133136
*/
134137
#[tokio::test]
138+
#[serial]
135139
async fn test_update_allocator() {
136140
setup_test_environment().await;
137141

@@ -179,6 +183,7 @@ mod tests {
179183
* @return () - The result of the test
180184
*/
181185
#[tokio::test]
186+
#[serial]
182187
async fn test_get_allocator() {
183188
setup_test_environment().await;
184189

@@ -195,6 +200,7 @@ mod tests {
195200
* @return () - The result of the test
196201
*/
197202
#[tokio::test]
203+
#[serial]
198204
async fn test_delete_allocator() {
199205
setup_test_environment().await;
200206

0 commit comments

Comments
 (0)