test(plugin): skip the rollback test where the user can write a read-only file
CI / installer (macos-14) (pull_request) Successful in 3s
CI / check (pull_request) Successful in 27s
CI / starter (bun) (pull_request) Successful in 31s
CI / starter (deno) (pull_request) Successful in 31s
CI / starter (edge) (pull_request) Successful in 38s
CI / core-freshness (pull_request) Has been skipped
CI / starter (node) (pull_request) Successful in 32s
CI / installer (ubuntu-latest) (pull_request) Successful in 11s
CI / installer (macos-14) (pull_request) Successful in 3s
CI / check (pull_request) Successful in 27s
CI / starter (bun) (pull_request) Successful in 31s
CI / starter (deno) (pull_request) Successful in 31s
CI / starter (edge) (pull_request) Successful in 38s
CI / core-freshness (pull_request) Has been skipped
CI / starter (node) (pull_request) Successful in 32s
CI / installer (ubuntu-latest) (pull_request) Successful in 11s
CI runs as root, which ignores a 0444 mode, so the entry write never fails there and there is nothing to roll back. The test now says it skipped instead of failing on a write that worked. Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
1 file changed
+6
@@ -490,6 +490,12 @@ fn in_app_leaves_nothing_behind_when_the_entry_cannot_be_written() {
|
||||
let d = project(APP);
|
||||
let entry = d.path().join("src/app.ts");
|
||||
std::fs::set_permissions(&entry, std::fs::Permissions::from_mode(0o444)).unwrap();
|
||||
// Root ignores the mode (CI containers run as root), so there is no failed
|
||||
// write to roll back from. Say so rather than pass on a write that worked.
|
||||
if std::fs::OpenOptions::new().write(true).open(&entry).is_ok() {
|
||||
eprintln!("skipped: this user can write a 0444 file, so the failure cannot be staged");
|
||||
return;
|
||||
}
|
||||
matcha(d.path())
|
||||
.args(["create", "plugin", "algo"])
|
||||
.assert()
|
||||
|
||||
Reference in new issue
Block a user