Skip to content

Commit

Permalink
Fix tests CI
Browse files Browse the repository at this point in the history
fixup

Fix broker loop test

Fix tests
  • Loading branch information
Fanda Vacek committed Sep 2, 2024
1 parent b491ba0 commit 62e5e6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Rust

on:
push:
branches: [ "master" ]
branches: [ "master", "dbg-action" ]
pull_request:
branches: [ "master" ]

Expand All @@ -22,8 +22,10 @@ jobs:
run: cargo install --git https://github.com/silicon-heaven/shvcall-rs.git
- name: Install shvbrokertestingdevice
run: cargo install --git https://github.com/silicon-heaven/shvbrokertestingdevice.git
- name: Install ncat
run: sudo apt-get install ncat
- name: Run tests
run: |
echo starting netcat
ncat -e /bin/cat -k -l 8888
ncat -e /bin/cat -k -l 8888 &
cargo test --verbose --all-features -- --test-threads=1
4 changes: 2 additions & 2 deletions src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ async fn test_broker_loop() {
assert_eq!(list, RpcValue::from(roles.clone()).as_list());
let resp = call(&join_path(path, "tester"), METH_VALUE, None, &call_ctx).await.unwrap();
let role1 = Role::try_from(&resp).unwrap();
let role2 = Role { roles: vec!["client".into()], access: vec![AccessRule{ shv_ri: "test/**:*".into(), grant: "cfg".into() }] };
assert_eq!(role1, role2);
let role2 = config.access.roles.get("tester").unwrap();
assert_eq!(&role1, role2);
}
{
let role = Role { roles: vec!["foo".into()], access: vec![AccessRule{ shv_ri: "bar/**:*".into(), grant: "cfg".into() }] };
Expand Down

0 comments on commit 62e5e6d

Please sign in to comment.