Skip to content

Commit

Permalink
fix (test): Fixed a broken test after decreasing history to 32.
Browse files Browse the repository at this point in the history
  • Loading branch information
JosiahBull committed Dec 13, 2021
1 parent 5c81284 commit 2a82945
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![codecov](https://codecov.io/gh/JosiahBull/rust-p2p-chat/branch/main/graph/badge.svg?token=G8ijVDm4rj)](https://codecov.io/gh/JosiahBull/rust-p2p-chat)
![Build](https://github.com/JosiahBull/festival-api/actions/workflows/test.yml/badge.svg)
[![Docs](https://github.com/JosiahBull/festival-api/actions/workflows/docs.yml/badge.svg)](https://josiahbull.github.io/festival-api/festival_api/index.html)
![Build](https://github.com/JosiahBull/rust-p2p-chat/actions/workflows/test.yml/badge.svg)
[![Docs](https://github.com/JosiahBull/rust-p2p-chat/actions/workflows/docs.yml/badge.svg)](https://josiahbull.github.io/rust-p2p-chat/rust_p2p_chat/index.html)

# P2P Chat Client

Expand Down
4 changes: 2 additions & 2 deletions src/history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ mod test_history {
#[test]
fn get_items() {
let mut history = History::new();
for i in 50..100 {
for i in 50..82 {
history.insert(i as i32);
}
for i in 0..50 {
for i in 0..32 {
let g = history.get(i).unwrap();
assert_eq!(*g as usize, i + 50);
}
Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let auth_keys = Keypair::<X25519Spec>::new()
.into_authentic(&id_keys)
.expect("unable to create authenticated keys");

let transport = TcpConfig::new()
.upgrade(upgrade::Version::V1)
.authenticate(NoiseConfig::xx(auth_keys).into_authenticated())
Expand Down

0 comments on commit 2a82945

Please sign in to comment.