A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/jirutka/nginx-testing below:

jirutka/nginx-testing: Support for integration/acceptance testing of nginx configuration in TypeScript/JavaScript.

binPath (?string)

Name or path of the nginx binary to start. Defaults to 'nginx'.

This option is ignored if version is provided.

version (?string)

A SemVer version range specifying the nginx version to run.

Nginx binary for your OS and architecture will be downloaded from nginx-binaries. It will be stored in directory .cache/nginx-binaries/ inside the nearest writeable node_modules directory or in nginx-binaries/ inside the system-preferred temp directory.

Not all versions are available. You can find a list of available binaries at nginx-binaries.

config (?string)

Nginx configuration to use.

If configPath is provided, the processed config will be written to a temporary file .<filename>~ (where <filename> is a filename from configPath) in the configPath’s directory (e.g. conf/nginx.confconf/.nginx.conf~). Otherwise it will be written into nginx.conf file in workDir. In either case, this file will be automatically deleted after stopping the nginx.

The config may include the following placeholders which will be replaced with corresponding values:

It will be modified for compatibility with the runner by applying patch operations specified in configPatch variable.

Either configPath, or config must be provided!

configPath (?string)

Path of the nginx configuration file to use.

This file will be processed and the resulting config file will be written to a temporary file .<filename>~ (where <filename> is a filename from configPath) in the configPath’s directory (e.g. conf/nginx.confconf/.nginx.conf~). This temporary file will be automatically deleted after stopping the nginx.

See config option for information about placeholders and patching.

Either configPath, or config must be provided!

bindAddress (?string)

Hostname or IP address the port(s) will be binding on. This is used when searching for free ports (see preferredPorts) and for substituting __ADDRESS__ placeholder in the given nginx config. Defaults to '127.0.0.1'.

ports (?number[])

A list of port numbers for substituting __PORT__, __PORT_1__, …​, __PORT_9__ placeholders in the given nginx config. Unlike preferredPorts, these are not checked for availability and nginx will fail to start if any of the provided and used ports is unavailable.

If it’s not provided or more ports are needed, next ports are selected from the preferredPorts or randomly.

preferredPorts (?number[])

A list of preferred port numbers to use for substituting __PORT__, __PORT_1__, …​, __PORT_9__ placeholders in the given nginx config.

Unavailable ports (used by some other program or restricted by OS) are skipped. If there are no preferred ports left and another port is needed, a random port number is used.

workDir (?string)

Path of a directory that will be passed as a prefix (-p) into nginx. It will be automatically created if doesn’t exist.

If not provided, an unique temporary directory will be created: .cache/nginx-testing-XXXXXX/ relative to the nearest writable node_modules (nearest to process.cwd()) or nginx-testing-XXXXXX/ in the system-preferred temp directory. The created directory will be automatically deleted after stopping.

errorLog (?string | ?stream.Writable)

One of:

Nginx error log is expected to be redirected to stderr. Directive error_log stderr info; will be automatically added to the config, unless there’s already error_log defined in the main context.

accessLog (?string | ?stream.Writable)

One of:

Nginx access log is expected to be redirected to file <workDir>/access.log. Directive access_log access.log; will be automatically added to the config, unless there’s already access_log defined in the http context.

startTimeoutMsec (?number)

Number of milliseconds after the start to wait for the nginx to respond to the health-check request (HEAD http://<bindAddress>:<ports[0]>/health). Any HTTP status is considered as success — it just checks if the nginx is listening and responding.

Defaults to 1000.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4