blob: 95754954e45f08f66e414bef7604140539af670f [file] [log] [blame]
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# To run the integration test:
# 1. build Traffic Monitor and then copy the RPM to this directory as traffic_monitor.rpm.
# 2. build traffic_monitor/tools/testcaches and place the binary in this directory.
# 3. build traffic_monitor/tools/testto and place the binary in this directory.
# 4. Run this compose
#
# Commands are, from the root trafficcontrol directory:
# ./pkg -v traffic_monitor_build
# cp ./dist/traffic_monitor*.rpm ./traffic_monitor/
# ./build_tests.sh
#
# To run the integration tests, your current working directory must be trafficcontrol/traffic_monitor.
# This is because Docker doesn't allow accessing files outside the current "context".
#
# docker-compose up -d
#
---
version: '3.8'
services:
testto:
build:
context: ../../..
dockerfile: traffic_monitor/tools/testto/Dockerfile
domainname: traffic-monitor-integration.test
env_file:
- variables.env
hostname: testto
image: testto
volumes:
- shared:/shared
testcaches:
build:
context: ../../..
dockerfile: traffic_monitor/tools/testcaches/Dockerfile
domainname: traffic-monitor-integration.test
env_file:
- variables.env
hostname: testcaches
image: testcaches
volumes:
- shared:/shared
trafficmonitor:
build:
context: ./tm
dockerfile: ./Dockerfile
args:
RPM: ./traffic_monitor.rpm
depends_on:
- testto
domainname: traffic-monitor-integration.test
env_file:
- variables.env
hostname: trafficmonitor
image: trafficmonitor
ports:
- "80:80"
volumes:
- shared:/shared
tmintegrationtest:
build:
context: ../../..
dockerfile: traffic_monitor/tests/_integration/Dockerfile
depends_on:
- testto
- testcaches
- trafficmonitor
domainname: traffic-monitor-integration.test
env_file:
- variables.env
hostname: tmintegrationtest
image: tmintegrationtest
volumes:
- shared:/shared
volumes:
shared:
external: false