1
0
mirror of https://github.com/cloudflare/gortr.git synced 2024-05-19 06:50:10 +00:00

Add docker-compose for integration testing

* Will mount a GoRTR with a basic rpki.json and slurm.json
* Run rtrdump
This commit is contained in:
Louis Poinsignon
2020-03-30 13:08:46 -07:00
parent c54d5f4c9a
commit 19fe0f80ab
4 changed files with 86 additions and 0 deletions

View File

@ -44,3 +44,19 @@ jobs:
- docker
script:
- make docker-gortr
- stage: integration
dist: trusty
services:
- docker
env:
- DOCKER_COMPOSE_VERSION=1.25.4
before_install:
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- docker-compose -f docker-compose-integration.yml up -d --build
script:
- docker-compose -f docker-compose-integration.yml run rtrdump
after_script:
- docker-compose -f docker-compose-integration.yml down

22
cmd/gortr/test.rpki.json Normal file
View File

@ -0,0 +1,22 @@
{
"metadata": {
"counts": 1,
"generated": 1577865600,
"valid": 1577866200,
"serial": 1
},
"roas": [
{
"prefix": "10.0.0.0/25",
"maxLength": 26,
"asn": "AS65000",
"ta": "Test ROA"
},
{
"prefix": "10.1.0.0/25",
"maxLength": 26,
"asn": "AS65001",
"ta": "Test ROA"
}
]
}

21
cmd/gortr/test.slurm.json Normal file
View File

@ -0,0 +1,21 @@
{
"slurmVersion": 1,
"validationOutputFilters": {
"prefixFilters": [
{
"asn": 65000,
"prefix": "10.0.0.0/24"
}
],
"bgpsecFilters": []
},
"locallyAddedAssertions": {
"prefixAssertions": [
{
"asn": 65002,
"prefix": "10.2.0.0/25",
"maxPrefixLength": 26
}
]
}
}

View File

@ -0,0 +1,27 @@
version: '3'
services:
gortr:
build:
dockerfile: Dockerfile.gortr
context: .
command:
- -cache
- rpki.json
- -slurm
- slurm.json
- -verify=false
- -checktime=false
volumes:
- ./cmd/gortr/test.rpki.json:/rpki.json
- ./cmd/gortr/test.slurm.json:/slurm.json
rtrdump:
build:
dockerfile: Dockerfile.rtrdump
context: .
command:
- -connect
- gortr:8282
- -file
- ""
depends_on:
- gortr