Hide Path implementation

This commit is contained in:
Adrian Heine 2020-08-03 19:28:05 +02:00
parent 10edcd4282
commit 7f5daa3c0e
4 changed files with 113 additions and 72 deletions

View file

@ -30,11 +30,17 @@ fn runs_only_once() {
};
let mut setup = Setup::new(runner);
assert_eq!(
(setup.add(Csr("somehost")).unwrap().0).0.to_str().unwrap(),
(setup.add(Csr("somehost")).unwrap().0)
.as_ref()
.to_str()
.unwrap(),
"/etc/ssl/local_certs/somehost.csr",
);
assert_eq!(
(setup.add(Csr("somehost")).unwrap().0).0.to_str().unwrap(),
(setup.add(Csr("somehost")).unwrap().0)
.as_ref()
.to_str()
.unwrap(),
"/etc/ssl/local_certs/somehost.csr",
);
assert_eq!(*count.borrow(), 2 + 5); // Key and CSR + 5 dirs
@ -48,7 +54,10 @@ fn can_create_an_acme_cert() {
};
let mut setup = Setup::new(runner);
assert_eq!(
(setup.add(Cert("somehost")).unwrap().0).0.to_str().unwrap(),
(setup.add(Cert("somehost")).unwrap().0)
.as_ref()
.to_str()
.unwrap(),
"/etc/ssl/local_certs/somehost.crt",
);
assert_eq!(*count.borrow(), 15);