dangogh closed pull request #2446: Updated to support the latest project
alignment and port switches
URL: https://github.com/apache/trafficcontrol/pull/2446
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/traffic_ops/testing/api/docker/Dockerfile
b/traffic_ops/testing/api/docker/Dockerfile
index d3d317a0e..a22cb61a8 100644
--- a/traffic_ops/testing/api/docker/Dockerfile
+++ b/traffic_ops/testing/api/docker/Dockerfile
@@ -20,12 +20,18 @@ ARG DB_SERVER
ARG DB_PORT
ARG DB_USER
ARG DB_PASSWORD
+ARG TO_URL
+ARG TODB_HOSTNAME
+ARG TODB_NAME
ENV DB_NAME=$DB_SERVER
ENV DB_SERVER=$DB_SERVER
ENV DB_PORT=$DB_PORT
ENV DB_USER=$DB_SERVER
ENV DB_PASSWORD=$DB_PASSWORD
+ENV TO_URL=$TO_URL
+ENV TODB_HOSTNAME=$TODB_HOSTNAME
+ENV TODB_NAME=$TODB_NAME
ARG SRC_DIR=/go/src
ARG TC_DIR=$SRC_DIR/github.com/apache/trafficcontrol
@@ -41,6 +47,7 @@ WORKDIR $TC_DIR
ADD lib lib
# Add the dependent dirs (without the cruft)
+ADD vendor vendor
ADD traffic_ops/traffic_ops_golang traffic_ops/traffic_ops_golang
ADD traffic_ops/vendor traffic_ops/vendor
ADD traffic_ops/testing/api traffic_ops/testing/api
diff --git a/traffic_ops/testing/api/docker/run_api_tests.sh
b/traffic_ops/testing/api/docker/run_api_tests.sh
index d6159b35a..fd78af71a 100755
--- a/traffic_ops/testing/api/docker/run_api_tests.sh
+++ b/traffic_ops/testing/api/docker/run_api_tests.sh
@@ -27,7 +27,7 @@ start() {
export PATH=/usr/local/go/bin:/opt/traffic_ops/go/bin:$PATH
export GOPATH=/go
go get -u golang.org/x/net/publicsuffix golang.org/x/crypto/scrypt
- TODB_HOSTNAME=db TODB_NAME=traffic_ops TO_URL=https://trafficops go test -v
-cfg=../conf/traffic-ops-test.conf
+ go test -v -cfg=../conf/traffic-ops-test.conf
}
diff --git a/traffic_ops/testing/api/docker/traffic-ops-test.env
b/traffic_ops/testing/api/docker/traffic-ops-test.env
index bdd5c7b16..2b5138034 100644
--- a/traffic_ops/testing/api/docker/traffic-ops-test.env
+++ b/traffic_ops/testing/api/docker/traffic-ops-test.env
@@ -14,11 +14,16 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-TO_URL=https://localhost:8443
+TO_URL=https://trafficops:6443
TO_USER=admin
TO_USER_PASSWORD=twelve
+
+# API Test Tool vars
+TODB_HOSTNAME=db
+TODB_NAME=traffic_ops
+
SSL_INSECURE=true
-DB_NAME=traffic_ops
+DB_NAME=db
DB_USER=traffic_ops
DB_PASSWORD=twelve
DB_PORT=5432
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services