Skip to content

Commit fb2b6b7

Browse files
committed
Switch to new sigs-based auth in VSS integration tests
When we added the trivial sigs-based authentication scheme in VSS, we made it the default if no other authentication scheme was configured and default features are enabled. This broke our integration tests as we were expecting no authentication to be required in such a case. Here we fix this by switching to the new sigs-based auth scheme, removing `store_id`s to demonstrate client isolation while we're at it.
1 parent 38ae0f9 commit fb2b6b7

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

tests/integration_tests_vss.rs

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ async fn channel_full_cycle_with_vss_store() {
2525
builder_a.set_chain_source_esplora(esplora_url.clone(), None);
2626
let vss_base_url = std::env::var("TEST_VSS_BASE_URL").unwrap();
2727
let node_a = builder_a
28-
.build_with_vss_store_and_fixed_headers(
28+
.build_with_vss_store(
2929
config_a.node_entropy,
3030
vss_base_url.clone(),
31-
"node_1_store".to_string(),
31+
"".to_owned(),
3232
HashMap::new(),
3333
)
3434
.unwrap();
@@ -39,10 +39,10 @@ async fn channel_full_cycle_with_vss_store() {
3939
let mut builder_b = Builder::from_config(config_b.node_config);
4040
builder_b.set_chain_source_esplora(esplora_url.clone(), None);
4141
let node_b = builder_b
42-
.build_with_vss_store_and_fixed_headers(
42+
.build_with_vss_store(
4343
config_b.node_entropy,
4444
vss_base_url,
45-
"node_2_store".to_string(),
45+
"".to_owned(),
4646
HashMap::new(),
4747
)
4848
.unwrap();
@@ -66,9 +66,6 @@ async fn vss_v0_schema_backwards_compatibility() {
6666
let esplora_url = format!("http://{}", electrsd.esplora_url.as_ref().unwrap());
6767
let vss_base_url = std::env::var("TEST_VSS_BASE_URL").unwrap();
6868

69-
let rand_suffix: String =
70-
(0..7).map(|_| rng().sample(rand::distr::Alphanumeric) as char).collect();
71-
let store_id = format!("v0_compat_test_{}", rand_suffix);
7269
let storage_path = common::random_storage_path().to_str().unwrap().to_owned();
7370
let seed_bytes = [42u8; 64];
7471
let node_entropy = NodeEntropy::from_seed_bytes(seed_bytes);
@@ -81,9 +78,9 @@ async fn vss_v0_schema_backwards_compatibility() {
8178
builder_old.set_entropy_seed_bytes(seed_bytes);
8279
builder_old.set_chain_source_esplora(esplora_url.clone(), None);
8380
let node_old = builder_old
84-
.build_with_vss_store_and_fixed_headers(
81+
.build_with_vss_store(
8582
vss_base_url.clone(),
86-
store_id.clone(),
83+
"".to_owned(),
8784
HashMap::new(),
8885
)
8986
.unwrap();
@@ -122,7 +119,7 @@ async fn vss_v0_schema_backwards_compatibility() {
122119
.build_with_vss_store_and_fixed_headers(
123120
node_entropy,
124121
vss_base_url,
125-
store_id,
122+
"".to_owned(),
126123
HashMap::new(),
127124
)
128125
.unwrap();
@@ -145,9 +142,6 @@ async fn vss_node_restart() {
145142
let esplora_url = format!("http://{}", electrsd.esplora_url.as_ref().unwrap());
146143
let vss_base_url = std::env::var("TEST_VSS_BASE_URL").unwrap();
147144

148-
let rand_suffix: String =
149-
(0..7).map(|_| rng().sample(rand::distr::Alphanumeric) as char).collect();
150-
let store_id = format!("restart_test_{}", rand_suffix);
151145
let storage_path = common::random_storage_path().to_str().unwrap().to_owned();
152146
let seed_bytes = [42u8; 64];
153147
let node_entropy = NodeEntropy::from_seed_bytes(seed_bytes);
@@ -162,7 +156,7 @@ async fn vss_node_restart() {
162156
.build_with_vss_store_and_fixed_headers(
163157
node_entropy,
164158
vss_base_url.clone(),
165-
store_id.clone(),
159+
"".to_owned(),
166160
HashMap::new(),
167161
)
168162
.unwrap();
@@ -196,7 +190,7 @@ async fn vss_node_restart() {
196190
.build_with_vss_store_and_fixed_headers(
197191
node_entropy,
198192
vss_base_url,
199-
store_id,
193+
"".to_owned(),
200194
HashMap::new(),
201195
)
202196
.unwrap();

0 commit comments

Comments
 (0)