1.1.3 • Published 5 years ago

@applitools/docker-compose-testkit v1.1.3

Weekly downloads
-
License
UNLICENSED
Repository
github
Last release
5 years ago

docker-compose-testkit

Library that simplifies using docker-compose-mocha with a variety of utilities.

Installing

npm install @applitools/docker-compose-testkit docker-compose-mocha

Using the package

  • yada yada yada
const {getAddressForService} = require('@applitools/docker-compose-testkit')

const composePath = path.join(__dirname, 'docker-compose.yml')
const envName = dockerComposeTool(before, after, composePath, {
  shouldPullImages: false,
})

const pubsubAddress = await getAddressForService(envName, composePath, 'pubsub', 8085)

API

getAddressForService(envName, composePath, serviceName, exposedPort)
  • envName: envName as returned by docker-compose-mocha's dockerComposeTool function.
  • composePath: the path to the compose file that was passed to docker-compose-mocha's dockerComposeTool function.
  • serviceName: the service name you want to get the address too, as defined in the docker compose file.
  • exposedPort: the container port of the service, which you wish to get the host address of.

  • Returns: the address of the service, as available in the host, in the form of domain:port.

  • Note: the first time this function is called it will query the information and cache the value. The other times will be much quicker, as it uses the cached value.
1.1.3

5 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.27

6 years ago

1.0.26

6 years ago

1.0.25

6 years ago

1.0.24

6 years ago

1.0.22

6 years ago

1.0.20

6 years ago

1.0.18

7 years ago

1.0.23

7 years ago

1.0.21

7 years ago

1.0.19

7 years ago

1.0.17

7 years ago

1.0.15

7 years ago

1.0.13

7 years ago

1.0.11

7 years ago

1.0.9

7 years ago

1.0.7

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago