Skip to content

Commit

Permalink
Delete TLS.md and update README.md about tests (valkey-io#960)
Browse files Browse the repository at this point in the history
Most of the content of TLS.md has already been copied to README.md in
valkey-io#927.

The description of how to run tests with TLS is moved to
tests/README.md.

Descriptions of the additional scripts runtest-cluster, runtest-sentinel
and runtest-module are added in tests/README.md.

Links to tests/README.md and src/unit/README.md are added in the
top-level README.md along with a brief overview of the `make test-*`
commands.

Signed-off-by: Viktor Söderqvist <[email protected]>
  • Loading branch information
zuiderkwast authored Aug 28, 2024
1 parent 927c2a8 commit 25dd943
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 113 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,16 @@ After building Valkey, it is a good idea to test it using:

% make test

If TLS is built, running the tests with TLS enabled (you will need `tcl-tls`
installed):
The above runs the main integration tests. Additional tests are started using:

% ./utils/gen-test-certs.sh
% ./runtest --tls
% make test-unit # Unit tests
% make test-modules # Tests of the module API
% make test-sentinel # Valkey Sentinel integration tests
% make test-cluster # Valkey Cluster integration tests

More about running the integration tests can be found in
[tests/README.md](tests/README.md) and for unit tests, see
[src/unit/README.md](src/unit/README.md).

Fixing build problems with dependencies or cached build options
---------
Expand Down
106 changes: 0 additions & 106 deletions TLS.md

This file was deleted.

26 changes: 23 additions & 3 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,35 @@ enabled using the `--host` and `--port` parameters. When executing against an
external server, tests tagged `external:skip` are skipped.

There are additional runtime options that can further adjust the test suite to
match different external server configurations:
match different external server configurations. All options are listed by
`./runtest --help`. The following table is just a subset of the options:

| Option | Impact |
| -------------------- | -------------------------------------------------------- |
| `--singledb` | Only use database 0, don't assume others are supported. |
| `--ignore-encoding` | Skip all checks for specific encoding. |
| `--ignore-digest` | Skip key value digest validations. |
| `--cluster-mode` | Run in strict Valkey Cluster compatibility mode. |
| `--large-memory` | Enables tests that consume more than 100mb |
| `--large-memory` | Enables tests that consume more than 100MB |
| `--tls` | Run tests with TLS. See below. |
| `--tls-module` | Run tests with TLS, when TLS support is built as a module. |
| `--help` | Displays the full set of options. |

Running with TLS requires the following preparations:

* Build Valkey is TLS support, e.g. using `make BUILD_TLS=yes`, or `make BUILD_TLS=module`.
* Run `./utils/gen-test-certs.sh` to generate a root CA and a server certificate.
* Install TLS support for TCL, e.g. the `tcl-tls` package on Debian/Ubuntu.

Additional tests
----------------

Not all tests are included in the `./runtest` scripts. Some additional entry points are provided by the following scripts, which support a subset of the options listed above:

* `./runtest-cluster` runs more extensive tests for Valkey Cluster.
Some cluster tests are included in `./runtest`, but not all.
* `./runtest-sentinel` runs tests of Valkey Sentinel.
* `./runtests-module` runs tests of the module API.

Debugging
---------
Expand Down Expand Up @@ -69,7 +89,7 @@ The following compatibility and capability tags are currently used:
| --------------------- | --------- |
| `external:skip` | Not compatible with external servers. |
| `cluster:skip` | Not compatible with `--cluster-mode`. |
| `large-memory` | Test that requires more than 100mb |
| `large-memory` | Test that requires more than 100MB |
| `tls:skip` | Not compatible with `--tls`. |
| `needs:repl` | Uses replication and needs to be able to `SYNC` from server. |
| `needs:debug` | Uses the `DEBUG` command or other debugging focused commands (like `OBJECT REFCOUNT`). |
Expand Down

0 comments on commit 25dd943

Please sign in to comment.