mirror of
https://github.com/talaia-labs/rust-teos.git
synced 2026-08-13 12:33:22 +02:00
Merge pull request #74 from sr-gi/minor-fixes
Minor fixes re: tests and logs
This commit is contained in:
commit
91aaa00a99
5 changed files with 7 additions and 6 deletions
2
.github/workflows/cln-plugin.yaml
vendored
2
.github/workflows/cln-plugin.yaml
vendored
|
|
@ -61,4 +61,4 @@ jobs:
|
|||
- name: Run tests
|
||||
run: |
|
||||
cd watchtower-plugin/tests
|
||||
DEVELOPER=1 poetry run pytest test.py -s
|
||||
DEVELOPER=1 SLOW_MACHINE=1 poetry run pytest test.py -s
|
||||
|
|
|
|||
|
|
@ -304,6 +304,7 @@ async fn main() {
|
|||
}));
|
||||
}
|
||||
|
||||
log::info!("Tower ready");
|
||||
chain_monitor.monitor_chain().await;
|
||||
|
||||
// Wait until shutdown
|
||||
|
|
|
|||
|
|
@ -76,7 +76,6 @@ fn generate_or_load_identity(
|
|||
&key_path
|
||||
);
|
||||
let keypair = KeyPair::generate(&rcgen::PKCS_ECDSA_P256_SHA256)?;
|
||||
//
|
||||
std::fs::write(&key_path, keypair.serialize_pem())?;
|
||||
log::debug!(
|
||||
"Generating a new certificate for key {:?} at {:?}",
|
||||
|
|
@ -106,7 +105,6 @@ fn generate_or_load_identity(
|
|||
Some(ca) => cert.serialize_pem_with_signer(&Certificate::try_from(ca)?)?,
|
||||
},
|
||||
)?;
|
||||
log::info!("writing certificate to file");
|
||||
}
|
||||
|
||||
let key = std::fs::read(&key_path)?;
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ class TeosD(TailableProc):
|
|||
if overwrite_key:
|
||||
self.cmd_line.append("--overwritekey")
|
||||
TailableProc.start(self)
|
||||
self.wait_for_log("Bootstrap completed. Turning on interfaces", timeout=TIMEOUT)
|
||||
self.wait_for_log("Tower ready", timeout=TIMEOUT)
|
||||
logging.info("TeosD started")
|
||||
|
||||
def stop(self):
|
||||
|
|
|
|||
|
|
@ -104,9 +104,11 @@ def test_unreachable_watchtower(node_factory, bitcoind, teosd):
|
|||
assert l2.rpc.gettowerinfo(tower_id)["status"] == "temporary_unreachable"
|
||||
assert l2.rpc.gettowerinfo(tower_id)["pending_appointments"]
|
||||
|
||||
# Start the tower and check the automatic backoff works
|
||||
# Start the tower and check the automatic backoff works (wait while are pending appointments)
|
||||
teosd.start()
|
||||
time.sleep(max_interval_time * 2)
|
||||
while l2.rpc.gettowerinfo(tower_id)["pending_appointments"]:
|
||||
time.sleep(1)
|
||||
|
||||
assert l2.rpc.gettowerinfo(tower_id)["status"] == "reachable"
|
||||
assert not l2.rpc.gettowerinfo(tower_id)["pending_appointments"]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue