blob: 58a68a9217e4c50abb4ea6e3af6d79004cdbe035 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
ct_helper
=========
Helper modules for common_test suites.
Creating temporary static files
-------------------------------
This library includes a function that will generate files tailored
for testing web servers. The following snippet will create a
directory containing all the files and subsequently delete it all.
``` erlang
ct_helper:create_static_dir(Path),
%% do things!
ct_helper:delete_static_dir(Path).
```
The following files are created. Replace `./` with the `Path` passed
as argument to find the real path of the files.
* ./
* ./directory/
* ./unknown
* ./style.css
* ./index.html
* ./unreadable (mode 0333)
Generating SSL certificates
---------------------------
This library includes a function that allows you to generate SSL
certificates for testing purposes. The following snippet can be
used to generate certificates and a private key.
``` erlang
{CaCert, Cert, Key} = ct_helper:make_certs().
```
The resulting `CaCert`, `Cert` and `Key` can be used directly with
Erlang functions like `ssl:connect/3`.
``` erlang
ssl:connect("example.com", 443, [binary, {cert, Cert}, {key, Key}]).
```
Support
-------
* Official IRC Channel: #ninenines on irc.freenode.net
* [Mailing Lists](http://lists.ninenines.eu)
|