toxiproxy_server: Control a test toxiproxy server

Description Usage Arguments Details

Description

Control a server for use with testing. This is designed to be used only by other packages that wish to run tests against a toxiproxy server. You will need to set TOXIPROXYR_SERVER_BIN_PATH to point at the directory containing the toxiproxy binary.

Usage

1
2
3
4
toxiproxy_server_install(quiet = FALSE, version = "v2.1.3")

toxiproxy_server(config = NULL, seed = NULL,
  if_disabled = testthat::skip)

Arguments

quiet

Suppress progress bars on install

version

Version of toxiproxy to install

config

Not yet handled

seed

Not yet handled

if_disabled

Callback function to run if the toxiproxy server is not enabled. The default, designed to be used within tests, is testthat::skip. Alternatively, inspect the $enabled property of the returned object.

Details

The function toxiproxy_server_install will install a server, but only if the user opts in by setting the environment variable TOXIPROXYR_SERVER_INSTALL to "true", and by setting TOXIPROXYR_SERVER_BIN_PATH to the directory where the binary should be downloaded to. This will download a ~10MB binary from https://github.com/Shopify/toxiproxy/releases so use with care. It is intended only for use in automated testing environments.


richfitz/toxiproxyr documentation built on May 27, 2019, 8:43 a.m.