Git Product home page Git Product logo

ct_helper's Introduction

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.

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.

{CaCert, Cert, Key} = ct_helper:make_certs().

The resulting CaCert, Cert and Key can be used directly with Erlang functions like ssl:connect/3.

ssl:connect("example.com", 443, [binary, {cert, Cert}, {key, Key}]).

Support

  • Official IRC Channel: #ninenines on irc.freenode.net
  • Mailing Lists

ct_helper's People

Contributors

essen avatar fishcakez avatar pib avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.