Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 0 additions & 72 deletions .github/workflows/traffic-ops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,78 +57,6 @@ on:

jobs:

APIv2Tests:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest

services:
postgres:
image: postgres:13
env:
POSTGRES_USER: traffic_ops
POSTGRES_PASSWORD: twelve
POSTGRES_DB: traffic_ops
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

smtp:
image: maildev/maildev:2.0.0-beta3
ports:
- 25:25
options: >-
--entrypoint=bin/maildev
--user=root
--health-cmd="sh -c \"[[ \$(wget -qO- http://smtp/healthz) == true ]]\""
--
maildev/maildev:2.0.0-beta3
--smtp=25
--hide-extensions=STARTTLS
--web=80

steps:
- name: Checkout
uses: actions/checkout@master
- name: Cache Alpine Docker image
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/docker-images
key: docker-images/alpine@${{ env.ALPINE_VERSION }}.tar.gz
- name: Import cached Alpine Docker image
run: .github/actions/save-alpine-tar/entrypoint.sh load ${{ env.ALPINE_VERSION }}
- name: Initialize Traffic Ops Database
id: todb
uses: ./.github/actions/todb-init
- name: Initialize Traffic Vault Database
id: tvdb
uses: ./.github/actions/tvdb-init
- name: Check Go Version
run: echo "::set-output name=value::$(cat GO_VERSION)"
id: go-version
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ steps.go-version.outputs.value }}
- name: Run API v2 tests
id: v2Tests
if: ${{ steps.todb.outcome == 'success' && always() }}
uses: ./.github/actions/to-integration-tests
with:
version: 2
smtp_address: 172.17.0.1
- name: Upload v2 Vault logs
if: ${{ steps.v2Tests.outcome != 'success' && always() }}
uses: actions/upload-artifact@v2
with:
name: v2 Traffic Vault logs
path: ${{ github.workspace }}/infrastructure/cdn-in-a-box/traffic.vault.logs
- name: Upload v2 Ops logs
if: ${{ steps.v2Tests.outcome != 'success' && always() }}
uses: actions/upload-artifact@v2
with:
name: v2 Traffic Ops logs
path: ${{ github.workspace }}/traffic_ops/traffic_ops_golang/traffic.ops.log

APIv3Tests:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Removed the Traffic Monitor `peer_polling_protocol` option. Traffic Monitor now just uses hostnames to request peer states, which can be handled via IPv4 or IPv6 depending on the underlying IP version in use.
- Dropped CentOS 8 support
- The `/servers/details` endpoint of the Traffic Ops API has been dropped in version 4.0, and marked deprecated in earlier versions.
- Remove Traffic Ops API version 2

### Changed
- [#6694](https://github.com/apache/trafficcontrol/issues/6694) Traffic Stats now uses the TO API 3.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ COPY ./vendor/ /go/src/github.com/apache/trafficcontrol/vendor/
# integration source and dependencies
COPY ./lib/ /go/src/github.com/apache/trafficcontrol/lib/
COPY ./traffic_ops/toclientlib/ /go/src/github.com/apache/trafficcontrol/traffic_ops/toclientlib/
COPY ./traffic_ops/v2-client/ /go/src/github.com/apache/trafficcontrol/traffic_ops/v2-client/
COPY ./traffic_ops/v3-client/ /go/src/github.com/apache/trafficcontrol/traffic_ops/v3-client/
COPY ./traffic_ops/v4-client/ /go/src/github.com/apache/trafficcontrol/traffic_ops/v4-client/
COPY ./traffic_ops/testing/api /go/src/github.com/apache/trafficcontrol/traffic_ops/testing/api
Expand All @@ -56,7 +55,7 @@ RUN go mod vendor -v

ENV CGO_ENABLED=0
RUN set -o errexit -o xtrace;\
for api_version in v2 v3 v4; do\
for api_version in v3 v4; do\
go test -c ./$api_version -ldflags="-w -s" -o traffic_ops_${api_version}_integration_test;\
done

Comment thread
zrhoffman marked this conversation as resolved.
Expand All @@ -79,11 +78,9 @@ RUN apk add --no-cache --update \
COPY ./infrastructure/cdn-in-a-box/traffic_ops_integration_test/run.sh /opt/integration/app/
COPY ./infrastructure/cdn-in-a-box/traffic_ops/to-access.sh /opt/integration/app/
COPY ./infrastructure/cdn-in-a-box/traffic_ops_integration_test/config.sh /opt/integration/app/
COPY ./traffic_ops/testing/api/v2/tc-fixtures.json /opt/integration/app/tc-fixtures-v2.json
COPY ./traffic_ops/testing/api/v3/tc-fixtures.json /opt/integration/app/tc-fixtures-v3.json
COPY ./traffic_ops/testing/api/v4/tc-fixtures.json /opt/integration/app/tc-fixtures-v4.json
COPY --from=integration-builder \
/go/src/github.com/apache/trafficcontrol/traffic_ops/testing/api/traffic_ops_v2_integration_test \
/go/src/github.com/apache/trafficcontrol/traffic_ops/testing/api/traffic_ops_v3_integration_test \
/go/src/github.com/apache/trafficcontrol/traffic_ops/testing/api/traffic_ops_v4_integration_test \
/opt/integration/app/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ done
source config.sh

exit_code=0
for api_version in v{2..4}; do
for api_version in v{3..4}; do
./traffic_ops_${api_version}_integration_test -test.v -cfg=traffic-ops-test.conf -fixtures=tc-fixtures-${api_version}.json 2>&1 | ./go-junit-report --package-name=golang.test.toapi.${api_version} --set-exit-code > /junit/golang.test.toapi.${api_version}.xml && find /junit -type 'f' | xargs chmod 664
declare ${api_version}_exit_code=$?
done

cat /junit/golang.test.toapi.v{2..4}.xml


if [[ $v2_exit_code -eq 0 && $v3_exit_code -eq 0 && $v4_exit_code -eq 0 ]]; then
if [[ $v3_exit_code -eq 0 && $v4_exit_code -eq 0 ]]; then
echo "TO API tests success"
else
echo "TO API tests failed"
Expand Down
3 changes: 0 additions & 3 deletions traffic_control/clients/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ There are two client libraries supported:
* [Documentation](https://github.com/apache/trafficcontrol/tree/master/traffic_control/clients/python/trafficops)

## Golang
### TO API v2 _(Deprecated)_
* [Documentation](https://github.com/apache/trafficcontrol/tree/master/traffic_ops/v2-client)

### TO API v3 _(Deprecated)_
* [Documentation](https://github.com/apache/trafficcontrol/tree/master/traffic_ops/v3-client)

Expand Down
2 changes: 1 addition & 1 deletion traffic_control/clients/python/trafficops/tosession.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ def delete_cdn_dns_sec_keys(self, cdn_name=None):
def create_cdn_dns_sec_keys(self, data=None):
"""
Generates ZSK and KSK keypairs for a CDN and all associated Delivery Services
:ref:`to-api-v2-cdns-dnsseckeys-generate`
:ref:`to-api-cdns-dnsseckeys-generate`
:param data: The parameter data to use for cachegroup creation.
:type data: Dict[str, Any]
:rtype: Tuple[Dict[str, Any], requests.Response]
Expand Down
18 changes: 0 additions & 18 deletions traffic_ops/testing/api/v2/.gitignore

This file was deleted.

33 changes: 0 additions & 33 deletions traffic_ops/testing/api/v2/about_test.go

This file was deleted.

77 changes: 0 additions & 77 deletions traffic_ops/testing/api/v2/api_capability_test.go

This file was deleted.

Loading