@@ -19,14 +19,14 @@ const (
1919)
2020
2121var (
22- bastion1 , _ = url .Parse ("https://b1.example.com/" )
23- bastion2 , _ = url .Parse ("https://b2 .example.com/" )
24- wit1 , _ = tessera .NewWitness (wit1_vkey , bastion1 )
25- wit2 , _ = tessera .NewWitness (wit2_vkey , bastion1 )
26- wit3 , _ = tessera .NewWitness (wit3_vkey , bastion2 )
27- wit1Sign , _ = note .NewSigner (wit1_skey )
28- wit2Sign , _ = note .NewSigner (wit2_skey )
29- wit3Sign , _ = note .NewSigner (wit3_skey )
22+ bastion , _ = url .Parse ("https://b1.example.com/" )
23+ directURL , _ = url .Parse ("https://witness .example.com/" )
24+ wit1 , _ = tessera .NewWitness (wit1_vkey , bastion . JoinPath ( "wit1prefix" ) )
25+ wit2 , _ = tessera .NewWitness (wit2_vkey , bastion . JoinPath ( "wit2prefix" ) )
26+ wit3 , _ = tessera .NewWitness (wit3_vkey , directURL )
27+ wit1Sign , _ = note .NewSigner (wit1_skey )
28+ wit2Sign , _ = note .NewSigner (wit2_skey )
29+ wit3Sign , _ = note .NewSigner (wit3_skey )
3030)
3131
3232func TestWitnessGroup_Empty (t * testing.T ) {
@@ -144,34 +144,34 @@ func TestWitnessGroup_URLs(t *testing.T) {
144144 {
145145 desc : "witness 1" ,
146146 group : tessera .NewWitnessGroup (1 , wit1 ),
147- expectedURLs : []string {"https://b1.example.com/b490a162bf632bdd72181cd9eb5b8ab8b13e4e973a9ce9a12a0810fd981bc186 /add-checkpoint" },
147+ expectedURLs : []string {"https://b1.example.com/wit1prefix /add-checkpoint" },
148148 },
149149 {
150150 desc : "witness 2" ,
151151 group : tessera .NewWitnessGroup (1 , wit2 ),
152- expectedURLs : []string {"https://b1.example.com/7a99cf3d04ea875d413c4b3fb70d74ef483efaf667eac56e35f0b96a112b1c84 /add-checkpoint" },
152+ expectedURLs : []string {"https://b1.example.com/wit2prefix /add-checkpoint" },
153153 },
154154 {
155155 desc : "witness 3" ,
156156 group : tessera .NewWitnessGroup (1 , wit3 ),
157- expectedURLs : []string {"https://b2 .example.com/ae59f4e59ea1802501b6000f875f09eb49d267055d4a1df8b6d862edc004334c /add-checkpoint" },
157+ expectedURLs : []string {"https://witness .example.com/add-checkpoint" },
158158 },
159159 {
160160 desc : "all witnesses in one group" ,
161161 group : tessera .NewWitnessGroup (1 , wit1 , wit2 , wit3 ),
162162 expectedURLs : []string {
163- "https://b1.example.com/b490a162bf632bdd72181cd9eb5b8ab8b13e4e973a9ce9a12a0810fd981bc186 /add-checkpoint" ,
164- "https://b1.example.com/7a99cf3d04ea875d413c4b3fb70d74ef483efaf667eac56e35f0b96a112b1c84 /add-checkpoint" ,
165- "https://b2 .example.com/ae59f4e59ea1802501b6000f875f09eb49d267055d4a1df8b6d862edc004334c /add-checkpoint" ,
163+ "https://b1.example.com/wit1prefix /add-checkpoint" ,
164+ "https://b1.example.com/wit2prefix /add-checkpoint" ,
165+ "https://witness .example.com/add-checkpoint" ,
166166 },
167167 },
168168 {
169169 desc : "all witnesses with duplicates in nests" ,
170170 group : tessera .NewWitnessGroup (2 , tessera .NewWitnessGroup (1 , wit1 , wit2 ), tessera .NewWitnessGroup (1 , wit1 , wit3 )),
171171 expectedURLs : []string {
172- "https://b1.example.com/b490a162bf632bdd72181cd9eb5b8ab8b13e4e973a9ce9a12a0810fd981bc186 /add-checkpoint" ,
173- "https://b1.example.com/7a99cf3d04ea875d413c4b3fb70d74ef483efaf667eac56e35f0b96a112b1c84 /add-checkpoint" ,
174- "https://b2 .example.com/ae59f4e59ea1802501b6000f875f09eb49d267055d4a1df8b6d862edc004334c /add-checkpoint" ,
172+ "https://b1.example.com/wit1prefix /add-checkpoint" ,
173+ "https://b1.example.com/wit2prefix /add-checkpoint" ,
174+ "https://witness .example.com/add-checkpoint" ,
175175 },
176176 },
177177 }
0 commit comments