Skip to content

Commit

Permalink
style: update tests name in xline-client
Browse files Browse the repository at this point in the history
This makes the name of the tests more meaningful

Signed-off-by: bsbds <[email protected]>
  • Loading branch information
bsbds authored and Phoenix500526 committed Jul 19, 2023
1 parent 45bf7c1 commit 3960b1b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions xline-client/tests/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use xlineapi::Type;
mod common;

#[tokio::test]
async fn role_operations() -> Result<()> {
async fn role_operations_should_success_in_normal_path() -> Result<()> {
let (_cluster, client) = get_cluster_client().await?;
let client = client.auth_client();
let role1 = "role1";
Expand Down Expand Up @@ -52,7 +52,7 @@ async fn role_operations() -> Result<()> {
}

#[tokio::test]
async fn permission_operations() -> Result<()> {
async fn permission_operations_should_success_in_normal_path() -> Result<()> {
let (_cluster, client) = get_cluster_client().await?;
let client = client.auth_client();

Expand Down Expand Up @@ -123,7 +123,7 @@ async fn permission_operations() -> Result<()> {
}

#[tokio::test]
async fn user_operations() -> Result<()> {
async fn user_operations_should_success_in_normal_path() -> Result<()> {
let (_cluster, client) = get_cluster_client().await?;
let client = client.auth_client();

Expand Down Expand Up @@ -155,7 +155,7 @@ async fn user_operations() -> Result<()> {
}

#[tokio::test]
async fn user_roles() -> Result<()> {
async fn user_role_operations_should_success_in_normal_path() -> Result<()> {
let (_cluster, client) = get_cluster_client().await?;
let client = client.auth_client();

Expand Down
8 changes: 4 additions & 4 deletions xline-client/tests/kv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mod common;

#[tokio::test]
#[abort_on_panic]
async fn test_put() -> Result<()> {
async fn put_should_success_in_normal_path() -> Result<()> {
let (_cluster, client) = get_cluster_client().await?;
let mut client = client.kv_client();

Expand Down Expand Up @@ -45,7 +45,7 @@ async fn test_put() -> Result<()> {

#[tokio::test]
#[abort_on_panic]
async fn test_get() -> Result<()> {
async fn range_should_fetches_previously_put_keys() -> Result<()> {
let (_cluster, client) = get_cluster_client().await?;
let mut client = client.kv_client();

Expand Down Expand Up @@ -96,7 +96,7 @@ async fn test_get() -> Result<()> {

#[tokio::test]
#[abort_on_panic]
async fn test_delete() -> Result<()> {
async fn delete_should_remove_previously_put_kvs() -> Result<()> {
let (_cluster, client) = get_cluster_client().await?;
let mut client = client.kv_client();

Expand Down Expand Up @@ -170,7 +170,7 @@ async fn test_delete() -> Result<()> {

#[tokio::test]
#[abort_on_panic]
async fn test_txn() -> Result<()> {
async fn txn_should_execute_as_expected() -> Result<()> {
let (_cluster, client) = get_cluster_client().await?;
let mut client = client.kv_client();

Expand Down
2 changes: 1 addition & 1 deletion xline-client/tests/maintenance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use xline_client::{clients::maintenance::MaintenanceClient, error::Result, Clien
use xline_test_utils::Cluster;

#[tokio::test]
async fn snapshot() -> Result<()> {
async fn snapshot_should_get_valid_data() -> Result<()> {
let (_cluster, mut client) = get_cluster_client().await?;

let mut msg = client.snapshot().await?;
Expand Down
2 changes: 1 addition & 1 deletion xline-client/tests/watch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use xlineapi::EventType;
mod common;

#[tokio::test]
async fn watch() -> Result<()> {
async fn watch_should_receive_consistent_events() -> Result<()> {
let (_cluster, client) = get_cluster_client().await?;
let mut watch_client = client.watch_client();
let mut kv_client = client.kv_client();
Expand Down

0 comments on commit 3960b1b

Please sign in to comment.