Add simple tests for gating tests
As before, cifs-utils gating tests don't do anything tests. Now add some simple tests. Such as mount/umount cifs. Signed-off-by: Xiaoli Feng <xifeng@redhat.com>
This commit is contained in:
parent
878da23627
commit
a42697c808
@ -1,6 +1,6 @@
|
|||||||
--- !Policy
|
--- !Policy
|
||||||
product_versions:
|
product_versions:
|
||||||
- rhel-10
|
- rhel-9
|
||||||
decision_context: osci_compose_gate
|
decision_context: osci_compose_gate
|
||||||
rules:
|
rules:
|
||||||
- !PassingTestCaseRule {test_case_name: manual.sst_filesystems.cifs-utils.buildbot}
|
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
||||||
|
24
tests/sanity/runtest.sh
Executable file
24
tests/sanity/runtest.sh
Executable file
@ -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
|
16
tests/tests.yml
Normal file
16
tests/tests.yml
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user