Skip to main content

CLI tool to test CDN

Project description

https://badge.fury.io/py/cdn-test.svg https://travis-ci.com/augustoliks/cdn-test.svg?branch=main

cdn-test

CLI tool created to automate tests for verify time cache in web-site delivered by CDN - CloudFront.

How to Install

The cdn-test package is hosted in Python Package Index (PyPI). To install cnd-test, it’s recommend create a virtualenv and install the package using pip. Example:

$ virtualenv --python=$(which python3) venv
$ source venv/bin/activate
$ pip3 install cdn-test

Manual

$ cdn-test -h

usage: cli.py [-h] [--url URL] [--time-step [TIME_STEP]] [--http-verb [HTTP_VERB]] [--header-name [HEADER_NAME]] [--output-file [OUTPUT_FILE]] [--version]

options:
  -h, --help            show this help message and exit
  --url URL, -u URL     URL to verified cache in cloudfront
  --time-step [TIME_STEP], -s [TIME_STEP]
                        time interval between requests
  --http-verb [HTTP_VERB], -x [HTTP_VERB]
                        HTTP verb utilized for requests to URL
  --header-name [HEADER_NAME]
                        response header name that contains "Miss from cloudfront" or "Hit from cloudfront"
  --output-file [OUTPUT_FILE], -f [OUTPUT_FILE]
                        file path to save records
  --version, -v         show cdn-test version

Examples

Each 10 seconds, it will be made a request with GET HTTP verb to web-site hosted by cloudformation with follow URL https://aws.amazon.com/pt/cloudfront/. The request history will be save on ~/cdn-report.json.

$ cdn-test --url=https://aws.amazon.com/pt/cloudfront/ --http-verb=GET --time-step=10s --output-file=~/cdn-report.json

Package Struct

├── src
   ├── cdn_test            # source code directory
   ├── __init__.py         # module definition file
   ├── cli.py              # parser cli parameters
   └── domain.py           # module composed only domain logics
├── poetry.lock             # poetry dependencies versions
├── pyproject.toml          # poetry package definition file
├── README.rst              # project documentation
└── tests                   # directory composed only with unit tests
    └── ...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cdn-test-0.1.5.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cdn_test-0.1.5-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file cdn-test-0.1.5.tar.gz.

File metadata

  • Download URL: cdn-test-0.1.5.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.7.1 Linux/4.15.0-1098-gcp

File hashes

Hashes for cdn-test-0.1.5.tar.gz
Algorithm Hash digest
SHA256 6196c4f5bb6c31ec32d8fcbab8ab6e72b9bf3c4164281a61acebbbdf92359440
MD5 a23dd9342243668cb0a50fcc27d08fc0
BLAKE2b-256 14bce1f5b8b2529ab1abf3d572322f71063361c6f6637fac4a0501e73ee89b37

See more details on using hashes here.

File details

Details for the file cdn_test-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: cdn_test-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.7.1 Linux/4.15.0-1098-gcp

File hashes

Hashes for cdn_test-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d48dd83700fcccc541e99c9a39e02c26c382e178e73917fda153ccd39b39bcd9
MD5 d65c120b57f5d4fb64fa13ac5f68c420
BLAKE2b-256 4e9d6c53c3076f43394873337f50d1cefcfabc24f076153fe2359d20e798f2df

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page