Skip to content

How to use blockade API inside container #75

Description

@HerculanoGripp

Hi guys, first of all thanks for the great tool.

I'm trying to use Blockade in my stack of tests and have some doubts. I have two containers one is server and other one is the client. I'm running my tests in client and in some cases need to change network parameters of server or client container. In documentation tells about Blockade API but i don't know how to use the API inside client container.

See below my setup configuration of blockade.yaml file

  containers:
  server:
    image: ubuntu:trusty
    command: sh -c "/bin/sleep 300000"
    volumes: ".": "/home/server/"
    expose: [80]
    ports: [5000]

  client:
    image: ubuntu:trusty
    command: sh -c "echo $SERVER_PORT_5000_TCP_ADDR ' google.com.br' >> /etc/hosts; ping $SERVER_PORT_5000_TCP_ADDR"
    volumes:
      "/home/user/client_app": "/home/client_app"
    links: ["server"]

  network:
  flaky: 80%
  slow: 75ms 100ms distribution normal

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions