Skip to content

Commit

Permalink
Added merge_v_tests feature for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
criminosis committed Jul 13, 2024
1 parent 3d3a300 commit 6f56392
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,27 @@ jobs:
command: fmt
args: --all -- --check
- name: Run cargo test with tokio
if: ${{ matrix.gremlin-server }} == 3.5.7
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path gremlin-client/Cargo.toml --features=tokio-runtime
- name: Run cargo test with async-std
if: ${{ matrix.gremlin-server }} == 3.5.7
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path gremlin-client/Cargo.toml --features=async-std-runtime
# MergeV as a step doesn't exist in 3.5.x, so selectively run those tests
- name: Run cargo test with tokio
if: ${{ matrix.gremlin-server }} == 3.6.5
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path gremlin-client/Cargo.toml --features=tokio-runtime,merge_v_tests
- name: Run cargo test with async-std
if: ${{ matrix.gremlin-server }} == 3.6.5
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path gremlin-client/Cargo.toml --features=async-std-runtime,merge_v_tests
1 change: 1 addition & 0 deletions gremlin-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ readme = "README.md"
[features]

default = []
merge_v_tests = []



Expand Down
8 changes: 5 additions & 3 deletions gremlin-client/tests/integration_traversal.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
use std::collections::HashMap;
use std::convert::TryInto;

use gremlin_client::process::traversal::{traversal, Order, __};
use gremlin_client::structure::{
Cardinality, List, Map, Merge, Pop, TextP, Vertex, VertexProperty, P, T,
Cardinality, List, Map, Pop, TextP, Vertex, VertexProperty, P, T,
};
use gremlin_client::{utils, GKey, GValue};
use gremlin_client::utils;

mod common;

Expand All @@ -23,6 +22,7 @@ fn test_simple_vertex_traversal() {
}

#[test]
#[cfg(feature = "merge_v_tests")]
fn test_merge_v_no_options() {
let g = traversal().with_remote(graph());
let expected_id = 1_000i64;
Expand Down Expand Up @@ -67,6 +67,7 @@ fn test_merge_v_no_options() {
}

#[test]
#[cfg(feature = "merge_v_tests")]
fn test_merge_v_options() {
let g = traversal().with_remote(graph());
let expected_label = "test_merge_v_options_label";
Expand Down Expand Up @@ -132,6 +133,7 @@ fn test_merge_v_options() {
}

#[test]
#[cfg(feature = "merge_v_tests")]
fn test_merge_v_start_step() {
let g = traversal().with_remote(graph());
let expected_id = 10000i64;
Expand Down

0 comments on commit 6f56392

Please sign in to comment.