Skip to content

Commit c2cafae

Browse files
akinomyogayedayak
authored andcommitted
test(xinetd_services): mock a proper /etc/xinetd.d
To test `_comp_compgen_xinetd_services`, we have been using a directory /test/fixtures/shared/bin (which contained two files `arp` and `ifconfig`as a mock /etc/xinetd.d. However, the directory /test/fixtures/shared/bin is shared with other tests, and the contents of the files therein are not proper xinetd configurations. We want to prepare a separate directory for a mock /etc/xinetd.d. This patch adds it under /test/fixtures/_comp_compgen_xinetd_services/xinetd.d.
1 parent a6fcf4b commit c2cafae

File tree

3 files changed

+1
-1
lines changed

3 files changed

+1
-1
lines changed

test/fixtures/_comp_compgen_xinetd_services/xinetd.d/arp

Whitespace-only changes.

test/fixtures/_comp_compgen_xinetd_services/xinetd.d/ifconfig

Whitespace-only changes.

test/t/unit/test_unit_compgen_xinetd_services.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def test_env_non_pollution(self, bash):
1717
def test_basic(self, bash):
1818
output = assert_bash_exec(
1919
bash,
20-
"foo() { local _comp__test_xinetd_dir=$PWD/shared/bin; unset -v COMPREPLY; "
20+
"foo() { local _comp__test_xinetd_dir=$PWD/_comp_compgen_xinetd_services/xinetd.d; unset -v COMPREPLY; "
2121
'_comp_compgen_xinetd_services; printf "%s\\n" "${COMPREPLY[@]}"; }; foo; unset -f foo',
2222
want_output=True,
2323
)

0 commit comments

Comments
 (0)