Skip to content

Commit 50873eb

Browse files
committed
upload: Add some extra tests for pgp-signed files
Closes #73.
1 parent af0b0d1 commit 50873eb

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

src/upload.rs

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,16 @@ mod tests {
589589

590590
let dsc1_file: &Utf8Path = "subdir/test-1.dsc".into();
591591
let dsc1_contents = format!(
592-
"Source: {}\nFiles:\n {} {} {}",
592+
"-----BEGIN PGP SIGNED MESSAGE-----
593+
594+
Source: {}
595+
Files:
596+
{} {} {}
597+
-----BEGIN PGP SIGNATURE-----
598+
aGVsbG8gd29ybGQK
599+
d29ybGQgaGVsbG8K
600+
-----END PGP SIGNATURE-----
601+
",
593602
TEST_PACKAGE_1,
594603
test1_md5_a,
595604
test1_contents_a.len(),
@@ -599,7 +608,17 @@ mod tests {
599608

600609
let dsc2_file: &Utf8Path = "subdir/test-2.dsc".into();
601610
let dsc2_contents = format!(
602-
"Source: {}\nFiles:\n {} {} {}\n {} {} {}",
611+
"-----BEGIN PGP SIGNED MESSAGE-----
612+
613+
Source: {}
614+
Files:
615+
{} {} {}
616+
{} {} {}
617+
-----BEGIN PGP SIGNATURE-----
618+
aGVsbG8gd29ybGQK
619+
d29ybGQgaGVsbG8K
620+
-----END PGP SIGNATURE-----
621+
",
603622
TEST_PACKAGE_1,
604623
test1_md5_a,
605624
test1_contents_a.len(),

0 commit comments

Comments
 (0)