Skip to content

Commit

Permalink
Fix tests; Add ignored http proxy tests under framework-test feature …
Browse files Browse the repository at this point in the history
…flag to system-tests
  • Loading branch information
nieznanysprawiciel committed Sep 9, 2024
1 parent 2fc0e1f commit adba79d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ static-openssl = ["openssl/vendored", "openssl-probe"]
dummy-driver = ['ya-dummy-driver']
erc20-driver = ['ya-erc20-driver']
tos = []
framework-test = ['ya-exe-unit/framework-test']
framework-test = ['ya-exe-unit/framework-test', 'ya-activity/framework-test']
# Temporary to make goth integration tests work
central-net = ['ya-net/central-net']
packet-trace-enable = [
Expand Down
3 changes: 3 additions & 0 deletions core/activity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version = "0.4.0"
authors = ["Golem Factory <contact@golem.network>"]
edition = "2018"

[features]
framework-test = ['ya-gsb-http-proxy/framework-test']

[dependencies]
ya-core-model = { version = "0.9", features = ["activity", "market"] }
ya-client-model = { version = "0.6", features = ["sgx"] }
Expand Down
3 changes: 3 additions & 0 deletions exe-unit/components/gsb-http-proxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version = "0.1.0"
edition = "2021"


[features]
framework-test = []

[dependencies]
ya-service-bus = { workspace = true }
ya-counters = { path = "../counters" }
Expand Down
6 changes: 4 additions & 2 deletions exe-unit/components/gsb-http-proxy/src/gsb_to_http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,9 @@ mod tests {
let mut requests_counter = gsb_call.requests_counter();
let mut requests_duration_counter = gsb_call.requests_duration_counter();

let caller = "0x0000000000000000000000000000000000000000".to_string();
let message = message();
let response = gsb_call.pass(message).await;
let response = gsb_call.pass(caller.clone(), message).await;

let mut headers = vec![];

Expand Down Expand Up @@ -390,9 +391,10 @@ mod tests {

async fn run_10_requests(mut gsb_call_proxy: GsbToHttpProxy) {
let message = message();
let caller = "0x0000000000000000000000000000000000000000".to_string();
for _ in 0..10 {
let message = message.clone();
let response = gsb_call_proxy.pass(message).await;
let response = gsb_call_proxy.pass(caller.clone(), message).await;
assert_eq!("response".as_bytes(), response.body.msg_bytes);
}
}
Expand Down

0 comments on commit adba79d

Please sign in to comment.