diff --git a/gating.yaml b/gating.yaml index a5b2e45..648918d 100644 --- a/gating.yaml +++ b/gating.yaml @@ -1,6 +1,6 @@ --- !Policy product_versions: - - rhel-10 + - rhel-9 decision_context: osci_compose_gate rules: - - !PassingTestCaseRule {test_case_name: manual.sst_filesystems.cifs-utils.buildbot} + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/tests/sanity/runtest.sh b/tests/sanity/runtest.sh new file mode 100755 index 0000000..68a4be5 --- /dev/null +++ b/tests/sanity/runtest.sh @@ -0,0 +1,24 @@ +#!/usr/bin/bash +set -x +CIFS_SHARE=$PWD/cifs-share +CIFS_MNT=$PWD/cifs-mnt +mount.cifs -V +cp /etc/samba/smb.conf /etc/samba/smb.conf.bark +cat << __EOF__ >/etc/samba/smb.conf +[cifs] +path=$CIFS_SHARE +writeable=yes +__EOF__ + +testparm -s +mkdir -p $CIFS_SHARE $CIFS_MNT +chcon -t samba_share_t $CIFS_SHARE +setsebool -P samba_export_all_rw on +echo -e "redhat\nredhat" | smbpasswd -a root -s +systemctl start smb +sleep 5 +mount //localhost/cifs $CIFS_MNT -o user=root,password=redhat +ls -l $CIFS_MNT +umount $CIFS_MNT +cp /etc/samba/smb.conf.bark /etc/samba/smb.conf +rm -rf $CIFS_SHARE $CIFS_MNT diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..039084f --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,16 @@ +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + tests: + - simple: + dir: sanity + run: ./runtest.sh + required_packages: + - which + - samba + - samba-client + - coreutils + - policycoreutils + - systemd