mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-03 10:11:15 +02:00
fix(cli): remove test only relevant to v1 branch, adjust migration test (#8451)
This commit is contained in:
committed by
GitHub
parent
41990cd344
commit
7e4580afed
@@ -165,19 +165,3 @@ where
|
||||
.map_err(|e| minisign::PError::new(minisign::ErrorKind::Io, e))?;
|
||||
Ok(BufReader::new(file))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
const PRIVATE_KEY: &str = "dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5dkpDN09RZm5GeVAzc2RuYlNzWVVJelJRQnNIV2JUcGVXZUplWXZXYXpqUUFBQkFBQUFBQUFBQUFBQUlBQUFBQTZrN2RnWGh5dURxSzZiL1ZQSDdNcktiaHRxczQwMXdQelRHbjRNcGVlY1BLMTBxR2dpa3I3dDE1UTVDRDE4MXR4WlQwa1BQaXdxKy9UU2J2QmVSNXhOQWFDeG1GSVllbUNpTGJQRkhhTnROR3I5RmdUZi90OGtvaGhJS1ZTcjdZU0NyYzhQWlQ5cGM9Cg==";
|
||||
|
||||
// we use minisign=0.7.3 to prevent a breaking change
|
||||
#[test]
|
||||
fn empty_password_is_valid() {
|
||||
let path = std::env::temp_dir().join("minisign-password-text.txt");
|
||||
std::fs::write(&path, b"TAURI").expect("failed to write test file");
|
||||
|
||||
let secret_key =
|
||||
super::secret_key(PRIVATE_KEY.into(), Some("".into())).expect("failed to resolve secret key");
|
||||
super::sign_file(&secret_key, &path).expect("failed to sign file");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -297,8 +297,12 @@ mod test {
|
||||
|
||||
// fs scope
|
||||
assert_eq!(
|
||||
migrated["plugins"]["fs"]["scope"],
|
||||
original["tauri"]["allowlist"]["fs"]["scope"]
|
||||
migrated["plugins"]["fs"]["scope"]["allow"],
|
||||
original["tauri"]["allowlist"]["fs"]["scope"]["allow"]
|
||||
);
|
||||
assert_eq!(
|
||||
migrated["plugins"]["fs"]["scope"]["deny"],
|
||||
original["tauri"]["allowlist"]["fs"]["scope"]["deny"]
|
||||
);
|
||||
|
||||
// shell scope
|
||||
@@ -323,8 +327,12 @@ mod test {
|
||||
original["tauri"]["allowlist"]["protocol"]["asset"]
|
||||
);
|
||||
assert_eq!(
|
||||
migrated["tauri"]["security"]["assetProtocol"]["scope"],
|
||||
original["tauri"]["allowlist"]["protocol"]["assetScope"]
|
||||
migrated["tauri"]["security"]["assetProtocol"]["scope"]["allow"],
|
||||
original["tauri"]["allowlist"]["protocol"]["assetScope"]["allow"]
|
||||
);
|
||||
assert_eq!(
|
||||
migrated["tauri"]["security"]["assetProtocol"]["scope"]["deny"],
|
||||
original["tauri"]["allowlist"]["protocol"]["assetScope"]["deny"]
|
||||
);
|
||||
|
||||
// security CSP
|
||||
|
||||
Reference in New Issue
Block a user