Skip to content

Commit

Permalink
Issue-63: add test for utf-8 filenames (#126)
Browse files Browse the repository at this point in the history
* Issue-63: add test for utf-8 filenames

* wip

* update test to check for success

* modified permissions on test script

* removed wip file
  • Loading branch information
dorschs57 committed May 18, 2021
1 parent abf533e commit 9ead29f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/bats/bin/ÀÆ.sh
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
echo -n "OK"
27 changes: 27 additions & 0 deletions tests/bats/trust_utf-8.bats
@@ -0,0 +1,27 @@
#!/usr/bin/env bats

export test_name="utf-8_filenames"

setup() {
load "helper/podman"
setup_with_rules ctcoss/fapolicy-analyzer trust.rules
add "bin/ÀÆ.sh"
}

# add the file through the ancillary trust
@test "trust: uft-8 names" {
run in_container "/deny/ÀÆ.sh"
assert_output --partial "permission denied"

run in_container python3 examples/add_trust.py "/deny/ÀÆ.sh"
assert_output --partial "applying"
assert_output --partial "signaling"

sleep 1

run in_container python3 examples/show_ancillary.py
assert_output --partial "/deny/ÀÆ.sh"

run in_container "/deny/ÀÆ.sh"
assert_output "OK"
}

0 comments on commit 9ead29f

Please sign in to comment.