Skip to content

Commit

Permalink
README.md: Add details on how the tests are run
Browse files Browse the repository at this point in the history
Information on working of sit-test-cases and the steps to manually run the
individual tests of sit-test-cases are missing.
Adding this data helps new contributers to quickly dive into development.

So added details and quick steps to start with individual tests.

Fixes: #19
Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
  • Loading branch information
Shwetha-Acharya committed Oct 3, 2023
1 parent cdd45bf commit 79d47ae
Showing 1 changed file with 50 additions and 1 deletion.
51 changes: 50 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,53 @@
# Samba integration tests

This branch contains the actual tests for the cluster nodes and are run on the client machines.
The tests are part of the Samba Integrated testing project
[sit-environment](https://github.com/samba-in-kubernetes/sit-environment)
and are primarily used to test Samba servers exporting a clustered
filesystem such as cephfs, glusterfs and others.

### Prerequisite:
The tests are designed to run against any SMB server. The only
prerequisite is that we have a SMB server exporting a filesystem which
can be accessed over the network.
Refer:
[server_setup](https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Standalone_Server)
[filesytem_export_with_glusterfs](https://wiki.samba.org/index.php/Samba_CTDB_GlusterFS_Cluster_HowTo)

### Quick guide on running the test-cases:
- Install sit-test-cases
```
$ git clone https://github.com/samba-in-kubernetes/sit-test-cases.git
```

- Rename test-info.yml.example file under sit-test-cases to test-info.yml
```
$ cd sit-test-cases
$ mv test-info.example test-info.yml
```

- Update the relevant information in test-info.yml such as private and
public interfaces, exported share names and test users and passwords from the
previously set up samba server.

- Run make sanity_test to confirm the sanity of the setup before running the tests
(Can be used whenever new set of changes are introduced in sit-test-cases):
```
$ make sanity_test
```

- Run full test suite using make test:
```
$ make test
```

- Run individual test cases(can be used for debugging):
```
$ pwd
$ /path/to/repo/sit-test-cases
$ PYTHONPATH=`pwd` TESTINFO_FILE=test-info.yml pytest -v testcases/smbtorture
```

NOTE:
- Some tests are performed against a share mounted using the cifs kernel module.
This particular action requires root access.

0 comments on commit 79d47ae

Please sign in to comment.