fix unit test for cert
parent
25e3d870e5
commit
83f736d9ff
|
@ -62,9 +62,9 @@ func TestSetupCerts(t *testing.T) {
|
|||
certStorePath := path.Join(SSLCertStoreDir, dst)
|
||||
certNameHash := "abcdef"
|
||||
remoteCertHashLink := path.Join(SSLCertStoreDir, fmt.Sprintf("%s.0", certNameHash))
|
||||
cmdMap[fmt.Sprintf("sudo ln -s '%s' '%s'", certFile, certStorePath)] = "1"
|
||||
cmdMap[fmt.Sprintf("openssl x509 -hash -noout -in '%s'", certFile)] = certNameHash
|
||||
cmdMap[fmt.Sprintf("sudo ln -s '%s' '%s'", certStorePath, remoteCertHashLink)] = "1"
|
||||
cmdMap[fmt.Sprintf("/bin/bash -c sudo ln -s '%s' '%s'", certFile, certStorePath)] = "1"
|
||||
cmdMap[fmt.Sprintf("/bin/bash -c openssl x509 -hash -noout -in '%s'", certFile)] = certNameHash
|
||||
cmdMap[fmt.Sprintf("/bin/bash -c sudo ln -s '%s' '%s'", certStorePath, remoteCertHashLink)] = "1"
|
||||
}
|
||||
f := command.NewFakeCommandRunner()
|
||||
f.SetCommandToOutput(cmdMap)
|
||||
|
|
Loading…
Reference in New Issue