Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: enable sandbox build with --no-default-features #73

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,7 @@ jobs:
run: cargo test

- name: Tests (Liquid mode, REST)
run: cargo test --features liquid
run: cargo test --features liquid

- name: Tests (no default features)
run: cargo test --no-default-features
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ readme = "README.md"
edition = "2018"

[features]
default = [ "dev" ]
liquid = [ "elements" ]
electrum-discovery = [ "electrum-client"]
dev = [ "bitcoind/25_0", "electrumd/4_1_5", "elementsd/22_1_1" ]

[dependencies]
arraydeque = "0.5.1"
Expand Down Expand Up @@ -58,9 +60,9 @@ electrum-client = { version = "0.8", optional = true }


[dev-dependencies]
bitcoind = { version = "0.34", features = [ "25_0" ] }
elementsd = { version = "0.9", features = [ "22_1_1" ] }
electrumd = { version = "0.1.0", features = [ "4_1_5" ] }
bitcoind = { version = "0.34" }
elementsd = { version = "0.9" }
electrumd = { version = "0.1.0" }
ureq = { version = "2.9", default-features = false, features = [ "json" ] }
tempfile = "3.10"

Expand Down
4 changes: 2 additions & 2 deletions tests/electrum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ use bitcoin::address;

/// Test the Electrum RPC server using an headless Electrum wallet
/// This only runs on Bitcoin (non-Liquid) mode.
#[cfg_attr(not(feature = "liquid"), test)]
#[cfg_attr(feature = "liquid", allow(dead_code))]
#[cfg_attr(all(feature = "dev", not(feature = "liquid")), test)]
#[cfg_attr(any(feature = "liquid", not(feature = "dev")), allow(dead_code))]
fn test_electrum() -> Result<()> {
// Spawn an Electrs Electrum RPC server
let (electrum_server, electrum_addr, mut tester) = common::init_electrum_tester().unwrap();
Expand Down
3 changes: 2 additions & 1 deletion tests/rest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ pub mod common;

use common::Result;

#[test]
#[cfg_attr(feature = "dev", test)]
#[cfg_attr(not(feature = "dev"), allow(dead_code))]
fn test_rest() -> Result<()> {
let (rest_handle, rest_addr, mut tester) = common::init_rest_tester().unwrap();

Expand Down
Loading