<commit_before># Test driven infrastructure

[![Build Status](https://travis-ci.org/wiktor-k/infrastructure-tests.svg?branch=master)](https://travis-ci.org/wiktor-k/infrastructure-tests) [![Dependency Status](https://dependencyci.com/github/wiktor-k/infrastructure-tests/badge)](https://dependencyci.com/github/wiktor-k/infrastructure-tests)

This repository contains tests of the *metacode.biz* infrastructure.
These tests always ask external services to assess the state of the infrastructure.

## Running tests

Running locally: `npm start`

Building and running through Docker:

    docker build -t metacode/infr . && docker run --rm -i metacode/infr

Or the same via npm alias: `npm run start-in-docker`

Putting the following script in `.git/hooks/pre-push` ensures that tests
pass locally before pushing them into the repository:

    #!/bin/bash

    npm run start-in-docker

Tests are executed on each commit to GitHub and additionally on schedule.

Testing the tests: `npm test`

## Test types

Currently tests cover:

  * HTTP/2 with [ALPN][ALPN],
  * IPv6 support,
  * [TLS configuration][SSLLABS],
  * [DNSSEC configuration][DNSSEC].

See [`infr.ts`](infr.ts) for a complete list of supported tests.

[ALPN]: https://en.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation
[SSLLABS]: https://www.ssllabs.com/ssltest/
[DNSSEC]: https://www.icann.org/resources/pages/dnssec-qaa-2014-01-29-en<commit_msg>Add information about security headers to README<commit_after># Test driven infrastructure

[![Build Status](https://travis-ci.org/wiktor-k/infrastructure-tests.svg?branch=master)](https://travis-ci.org/wiktor-k/infrastructure-tests) [![Dependency Status](https://dependencyci.com/github/wiktor-k/infrastructure-tests/badge)](https://dependencyci.com/github/wiktor-k/infrastructure-tests)

This repository contains tests of the *metacode.biz* infrastructure.
These tests always ask external services to assess the state of the infrastructure.

## Running tests

Running locally: `npm start`

Building and running through Docker:

    docker build -t metacode/infr . && docker run --rm -i metacode/infr

Or the same via npm alias: `npm run start-in-docker`

Putting the following script in `.git/hooks/pre-push` ensures that tests
pass locally before pushing them into the repository:

    #!/bin/bash

    npm run start-in-docker

Tests are executed on each commit to GitHub and additionally on schedule.

Testing the tests: `npm test`

## Test types

Currently tests cover:

  * HTTP/2 with [ALPN][ALPN],
  * IPv6 support,
  * [TLS configuration][SSLLABS],
  * [DNSSEC configuration][DNSSEC],
  * [Security headers][SECH].

See [`infr.ts`](infr.ts) for a complete list of supported tests.

[ALPN]: https://en.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation
[SSLLABS]: https://www.ssllabs.com/ssltest/
[DNSSEC]: https://www.icann.org/resources/pages/dnssec-qaa-2014-01-29-en
[SECH]: https://securityheaders.io/
{'fraction_non_alphanumeric': 0.1231711466485199, 'fraction_numerical': 0.006805035726437564, 'mean_word_length': 4.5893536121673, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 15, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3644329', 'n_tokens_mistral': 960, 'n_tokens_neox': 909, 'n_words': 259}