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

Gh 784 fixing review for tests in Actions #475

Closed
wants to merge 117 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
9e83a53
About to simplify
dnwiebe Mar 29, 2024
9709bfe
Almost right
dnwiebe Apr 4, 2024
0b7c81a
All BitQueue tests passing
dnwiebe Apr 5, 2024
e4740d3
A little cleanup
dnwiebe Apr 5, 2024
b6478ff
Can serialize IPv4 now
dnwiebe Apr 5, 2024
bcdf410
Serialization is working for IPv6 now
dnwiebe Apr 6, 2024
f4ee361
Deserializes IPv4 CountryBlocks
dnwiebe Apr 7, 2024
7c92b86
Minor corrections
dnwiebe Apr 7, 2024
69d6a0b
Deserialization works for IPv6
dnwiebe Apr 7, 2024
8f5387b
Minor cleanup
dnwiebe Apr 7, 2024
880e1c3
Added documentation of compressed format
dnwiebe Apr 7, 2024
fdcb8be
Completed outstanding CSV validation
dnwiebe Apr 7, 2024
d71041b
Now generates code
dnwiebe Apr 7, 2024
cda7329
country_finder now works
dnwiebe Apr 7, 2024
b9e9822
Now the error flow works for ip-country::main.
dnwiebe Apr 7, 2024
6f8a82f
Added generated IP/Country database file
dnwiebe Apr 8, 2024
9dcd67a
remove unnecesary parenthesis and add Slovak IP to test
czarte Apr 10, 2024
a976dbe
node_location.rs with first few tests
czarte Apr 12, 2024
35253da
tests for assing 100 and 10 ips with the NodeLocation + fixing some w…
czarte Apr 15, 2024
05f6324
formatting
czarte Apr 15, 2024
1ec7cb3
remove tests, change processing of get_node_location fn, adding comme…
czarte Apr 17, 2024
861ae36
added free_world_bit and country_code to Gossip. test for country_cod…
czarte Apr 22, 2024
0a20e71
changes to NodeRecordInner_0v1
czarte Apr 23, 2024
d112b79
removed id from NodeLocation, added NodeLocation processing into Node…
czarte Apr 30, 2024
785baf7
add lazy_static COUNTRY_CODE_DIGEST, and its processing fn to use in …
czarte May 3, 2024
b9f72f2
remove free_world_bit from NodeRecordInner_0v1, fixing tests, fixing …
czarte May 6, 2024
a6c1c33
fixing tests for NodeLocation in neighborhood DB
czarte May 7, 2024
67ab0b9
fixed tests for neighborhood_database
czarte May 8, 2024
336b9d1
formatting and reducing variables to NodeRecord::new() with struct No…
czarte May 10, 2024
7b68d13
add free_world_bit to NodeLocation, fixed tests for NodeRecord
czarte May 10, 2024
3c05c5b
fixing tests for gossip_acceptor
czarte May 13, 2024
6ef0d20
fixing tests for gossip acceptor
czarte May 14, 2024
72ef4d0
fixing tests for gossip_acceptor
czarte May 15, 2024
1a1e3f3
fixed tests for gossip_acceptor
czarte May 15, 2024
40ff41a
take out performance tests for node_location from ci/all, fixed tests…
czarte May 15, 2024
79dc64f
add mock for location in make_node_record, fixing tests
czarte May 16, 2024
afbc510
removing obsolete injections
czarte May 16, 2024
eb73341
fixed last test for gossip_acceptor
czarte May 17, 2024
1a9eb4f
add country_code and metadata for country_code into the multinode int…
czarte May 21, 2024
0c8b33d
formatting
czarte May 21, 2024
c7b72e2
add start blockchain to test
czarte May 22, 2024
811f569
fixing debtors_are_credited_once_but_not_twice
czarte May 23, 2024
f242cb0
fix the panic
czarte May 23, 2024
a2b4fdd
fixing test debtors_are_credited_once_but_not_twice failing on local …
czarte May 25, 2024
b4bb58c
fixed test debtors_are_credited_once_but_not_twice - added response f…
czarte May 26, 2024
5b7a27c
formatting and removing condition for debtors_are_credited_once_but_n…
czarte May 26, 2024
2c93011
fixed Error messages in test for BlockchainBridge
czarte May 26, 2024
d90d558
remove unused import
czarte May 27, 2024
0243e9c
exclude test debtors_are_credited_once_but_not_twice from Actions aga…
czarte May 28, 2024
f2426a9
move get_node_location out of arguments for construction of NodeRecor…
czarte Jun 5, 2024
69005b1
fix gossip_acceptor try_accept_debut to be able reply correctly in ca…
czarte Jun 6, 2024
b0c050e
add more testing for two_debut_in_same_time_with_empty_db_handled_by_…
czarte Jun 7, 2024
3232480
introduce in memory Vec<CountryBlock> to speed up ip_country lookup, …
czarte Jun 12, 2024
05a5fab
introducing in memory country_finder blocks for speeding up the ip_co…
czarte Jun 17, 2024
8e8d275
fix node_location for CountryCodeFinder::find_country, adjust perform…
czarte Jun 18, 2024
53d583c
formatting
czarte Jun 18, 2024
48136dd
remove commented code
czarte Jun 18, 2024
1d6e0b6
fixing the tests handling gossips & formatting
czarte Jun 18, 2024
ea1ddf5
implemented country into the NodeDescriptor
czarte Jun 20, 2024
90bfdea
remove redundant clones and fix Bootstrapper
czarte Jun 21, 2024
0fc112a
performance tests and fix bootstrapper
czarte Jun 24, 2024
8379850
fix neigborhood construction of country_code
czarte Jun 24, 2024
c5ddc8e
removing coutry_code from NodeDescriptor
czarte Jun 27, 2024
b961c0a
formatting
czarte Jun 27, 2024
cfe201b
fix ui_gateway tests with new function recreate_data_dir and match in…
czarte Jun 28, 2024
d131aa4
formatting
czarte Jun 28, 2024
44be8bb
fix return value
czarte Jun 28, 2024
113ddd2
PathBuf:from instead .into
czarte Jun 28, 2024
d4afbf5
add running_test() to start_something(), add || pwd to ci/all.sh
czarte Jul 2, 2024
2ee42b8
allow to fail multinode integration tests
czarte Jul 2, 2024
3aef15d
add thread::sleep to log_broadcasts_are_correctly_received_integratio…
czarte Jul 2, 2024
4e8f30e
formatting
czarte Jul 2, 2024
7fdb882
remove argument to pass even on fail
czarte Jul 2, 2024
e19a4a3
fix node_remembers_its_neighbors_across_a_bounce by thread::sleep for…
czarte Jul 3, 2024
9f01938
switch from thread::sleep to loop with Tcp connection to None until i…
czarte Jul 5, 2024
68f3c04
remove unused import
czarte Jul 5, 2024
77d9cd9
continue of code review changes
czarte Jul 17, 2024
c974b66
test for panic in handle_retrieve_transactions
czarte Jul 19, 2024
c859541
fixing more comments from review
czarte Jul 23, 2024
3c93749
removing TODO
czarte Jul 23, 2024
0d50bbe
implementing review, added two new tests for ip_country
czarte Jul 24, 2024
15fa3ee
removing unnecesary country_code from node_descriptor
czarte Jul 26, 2024
4c2d57b
added cfg(test) and cfg(not(test)) for static ref COUNTRY_CODE_FINDER…
czarte Jul 26, 2024
75fb708
change country_code member of NodeRecordInner_0v1 to country_code_opt
czarte Jul 26, 2024
78cc0c2
simplifying tests in node_record.rs and neighborhood_database.rs
czarte Jul 26, 2024
fe8a9b4
resolving review comments
czarte Jul 30, 2024
bf10d81
final changes in gossip_acceptor from review
czarte Jul 31, 2024
bec7b8b
continue of implementing review comments
czarte Jul 31, 2024
1a74962
fix test return value
czarte Jul 31, 2024
f750f01
added ip_country to ci/all.sh
czarte Aug 7, 2024
002a311
cherry-pick from GH-784-fix-for-Vojta and implementing iterator for d…
czarte Aug 7, 2024
7cd7c0d
try to create test for fmt
czarte Aug 7, 2024
bc7a6cc
tests for print ip v4 and v6 vec[u8] in country_block_serde.rs
czarte Aug 8, 2024
69f79c5
ci for ip_country + resolved conflicts of clippy
czarte Aug 13, 2024
b0d8958
masq_lib dependencies solved
czarte Aug 14, 2024
f549131
dependency masq_lib for ip_country in node workspace
czarte Aug 14, 2024
ac3f186
remove commented out code + fix condition for non empty bit_queue
czarte Aug 14, 2024
e72ae56
formatting
czarte Aug 14, 2024
f5bb091
5 seconds for wait_for_log in requested_chain_meets_different_db_chai…
czarte Aug 15, 2024
2771e36
fixing impl for AGR in multinode tests
czarte Aug 15, 2024
715587e
formatting
czarte Aug 15, 2024
44db161
fix nonexistent NodeAddr in multinode tests for AGR
czarte Aug 16, 2024
d5307f3
change single match to if
czarte Aug 16, 2024
201cced
try to fix build in actions for MacOS
czarte Aug 19, 2024
e974e67
try to find out disk space on MacOS container in Actions
czarte Aug 19, 2024
f5f4afc
add diagnostics commands on failure
czarte Aug 19, 2024
859452b
check diskspace before ci/all.sh workflow runs
czarte Aug 19, 2024
6627715
diagnose mounted disks
czarte Aug 19, 2024
3ce6ac3
analyze /var/ diskspace
czarte Aug 19, 2024
b350db9
remove advanced diagnosticst for disk space
czarte Aug 20, 2024
8463d3d
switch macos to version 13
czarte Aug 20, 2024
7406b6f
diagnostics for /Users/runner/work/Node/Node/node/target/release
czarte Aug 21, 2024
9dd7982
fasten diagnostics
czarte Aug 21, 2024
e316e6c
fasten diagnostics fix
czarte Aug 21, 2024
c803f56
fasten diagnostics back
czarte Aug 21, 2024
b85253a
test for mac-os build without masq_lib for ip_country
czarte Aug 21, 2024
26c67c4
remove masq_lib from ip_country
czarte Aug 21, 2024
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
11 changes: 1 addition & 10 deletions node/src/neighborhood/neighborhood_database.rs
Original file line number Diff line number Diff line change
@@ -396,16 +396,7 @@ mod tests {

let subject = db_from_node(&this_node);

let this_pubkey = this_node.public_key();
let last_update = subject
.by_public_key
.iter()
.map(|(pubkey, node_record)| match pubkey == this_pubkey {
true => node_record.metadata.last_update,
false => todo!("implement me"),
})
.exactly_one()
.unwrap();
let last_update = subject.root().metadata.last_update;
this_node.metadata.last_update = last_update;

assert_eq!(subject.this_node, this_node.public_key().clone());
30 changes: 12 additions & 18 deletions node/src/neighborhood/node_record.rs
Original file line number Diff line number Diff line change
@@ -631,69 +631,62 @@ mod tests {
version: 0,
location: None,
};
let node_record_data_duplicate = node_record_data.clone();
let node_record_data_with_neighbor = node_record_data.clone();
let node_record_data_mod_key = node_record_data.clone();
let mut node_record_data_mod_earning_wallet = node_record_data.clone();
let mut node_record_data_mod_rate_pack = node_record_data.clone();
let mut node_record_data_mod_accepts_connections = node_record_data.clone();
let mut node_record_data_mod_routes_data = node_record_data.clone();
let mut node_record_data_mod_version = node_record_data.clone();
let node_record_data_mod_signed_gossip = node_record_data.clone();
let node_record_data_mod_signature = node_record_data.clone();
let node_record_data_mod_node_addr = node_record_data.clone();
let exemplar = NodeRecord::new(
&PublicKey::new(&b"poke"[..]),
main_cryptde(),
node_record_data,
node_record_data.clone(),
);
let duplicate = NodeRecord::new(
&PublicKey::new(&b"poke"[..]),
main_cryptde(),
node_record_data_duplicate,
node_record_data.clone(),
);
let mut with_neighbor = NodeRecord::new(
&PublicKey::new(&b"poke"[..]),
main_cryptde(),
node_record_data_with_neighbor,
node_record_data.clone(),
);
let mod_key = NodeRecord::new(
&PublicKey::new(&b"kope"[..]),
main_cryptde(),
node_record_data_mod_key,
node_record_data.clone(),
);
with_neighbor
.add_half_neighbor_key(mod_key.public_key().clone())
.unwrap();
let mut mod_node_addr = NodeRecord::new(
&PublicKey::new(&b"poke"[..]),
main_cryptde(),
node_record_data_mod_node_addr,
node_record_data.clone(),
);
mod_node_addr
.set_node_addr(&NodeAddr::new(
&IpAddr::from_str("1.2.3.5").unwrap(),
&[1234],
))
.unwrap();
let mut node_record_data_mod_earning_wallet = node_record_data.clone();
node_record_data_mod_earning_wallet.earning_wallet = make_wallet("booga");
let mod_earning_wallet = NodeRecord::new(
&PublicKey::new(&b"poke"[..]),
main_cryptde(),
node_record_data_mod_earning_wallet,
);
let mut node_record_data_mod_rate_pack = node_record_data.clone();
node_record_data_mod_rate_pack.rate_pack = rate_pack(200);
let mod_rate_pack = NodeRecord::new(
&PublicKey::new(&b"poke"[..]),
main_cryptde(),
node_record_data_mod_rate_pack,
);
let mut node_record_data_mod_accepts_connections = node_record_data.clone();
node_record_data_mod_accepts_connections.accepts_connections = false;
let mod_accepts_connections = NodeRecord::new(
&PublicKey::new(&b"poke"[..]),
main_cryptde(),
node_record_data_mod_accepts_connections,
);
let mut node_record_data_mod_routes_data = node_record_data.clone();
node_record_data_mod_routes_data.routes_data = false;
let mod_routes_data = NodeRecord::new(
&PublicKey::new(&b"poke"[..]),
@@ -703,15 +696,16 @@ mod tests {
let mut mod_signed_gossip = NodeRecord::new(
&PublicKey::new(&b"poke"[..]),
main_cryptde(),
node_record_data_mod_signed_gossip,
node_record_data.clone(),
);
mod_signed_gossip.signed_gossip = mod_rate_pack.signed_gossip.clone();
let mut mod_signature = NodeRecord::new(
&PublicKey::new(&b"poke"[..]),
main_cryptde(),
node_record_data_mod_signature,
node_record_data.clone(),
);
mod_signature.signature = CryptData::new(&[]);
let mut node_record_data_mod_version = node_record_data.clone();
node_record_data_mod_version.version = 1;
let mod_version = NodeRecord::new(
&PublicKey::new(&b"poke"[..]),