You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by ra...@apache.org on 2020/04/15 15:15:25 UTC
[trafficcontrol] branch master updated: Updating the testing documentation for TO to add more info about buil… (#4630)
This is an automated email from the ASF dual-hosted git repository.
rawlin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
The following commit(s) were added to refs/heads/master by this push:
new 68f7e07 Updating the testing documentation for TO to add more info about buil… (#4630)
68f7e07 is described below
commit 68f7e07ca85fdee87ddc95d46da96e8fb00cdcfa
Author: Srijeet Chatterjee <30...@users.noreply.github.com>
AuthorDate: Wed Apr 15 09:15:11 2020 -0600
Updating the testing documentation for TO to add more info about buil… (#4630)
* Updating the testing documentation for TO to add more info about build steps
* Addressing review comments
* Addressing review comments
* Addressing review comments, fix format issue
---
traffic_ops/testing/api/README.md | 34 ++++++++++++++++++++++++++++++++--
1 file changed, 32 insertions(+), 2 deletions(-)
diff --git a/traffic_ops/testing/api/README.md b/traffic_ops/testing/api/README.md
index b15ef8b..73a1559 100644
--- a/traffic_ops/testing/api/README.md
+++ b/traffic_ops/testing/api/README.md
@@ -41,7 +41,33 @@ In order to run the tests you will need the following:
and here: `traffic-ops-test.conf`
The Traffic Ops users will be created by the tool for accessing the API once the database is accessible.
-
+
+ Note that for the database to successfully set up the tables and run the migrations, you will need `goose`.
+ On your local machines(Macs), DO NOT install `goose` using `homebrew`. It will install a different version
+ `goose`. Instead, install it using the script located at
+ `traffic_ops/install/bin/install_goose.sh`.
+ To test if `goose` migrated everything correctly, you can run the following command from the `traffic_ops/app`
+ directory:
+ `goose -env=test status "user=traffic_ops dbname=to_test sslmode=disable"`
+
+ The result should be something similar to:
+ ```
+ goose: status for environment 'test'
+ Applied At Migration
+ =======================================
+ Thu Apr 9 21:55:29 2020 -- 20181206000000_create_monitor_snapshots.sql
+ Thu Apr 9 21:55:29 2020 -- 20190219000000_add_consistent_hash_regex.sql
+ Thu Apr 9 21:55:29 2020 -- 20190319000000_add_max_origin_connections.sql
+ Thu Apr 9 21:55:30 2020 -- 20190513000000_add-allowed_query_keys.sql
+ Thu Apr 9 21:55:30 2020 -- 20191004000000_add_server_capabilities.sql
+ Thu Apr 9 21:55:30 2020 -- 20191005000000_add_server_server_capability.sql
+ Thu Apr 9 21:55:30 2020 -- 20191024000000_add_deliveryservices_required_capability.sql
+ Thu Apr 9 21:55:30 2020 -- 20191215000000_add_ecs_enabled.sql
+ Thu Apr 9 21:55:30 2020 -- 20200218000000_add_dns_challenges.sql
+ Thu Apr 9 21:55:30 2020 -- 20200227000000_add_ds_slice_block_size.sql
+ Thu Apr 9 21:55:30 2020 -- 20200313000000_add_server_ip_toggles.sql
+ ```
+
For more info see: http://trafficcontrol.apache.org/docs/latest/development/traffic_ops.html?highlight=reset
3. A running Traffic Ops instance running with the `secure` (https) and is pointing to the `to_test`
@@ -60,7 +86,11 @@ In order to run the tests you will need the following:
change `traffic_ops_golang->port` to 8443
`$ go build && ./traffic_ops_golang -cfg $HOME/cdn.conf -dbcfg ../app/conf/test/database.conf`
-
+
+ In your local development environment, if the above command fails for an error similar to
+ `ERROR: traffic_ops_golang.go:193: 2020-04-10T10:55:53.190298-06:00: cannot open /etc/pki/tls/certs/localhost.crt for read: open /etc/pki/tls/certs/localhost.crt: no such file or directory`
+ you might not have the right certificates at the right locations. Follow the procedure listed
+ [here](https://traffic-control-cdn.readthedocs.io/en/latest/admin/traffic_ops.html#id12) to fix it.
## Running the API Tests
The integration tests are run using `go test`, however, there are some flags that need to be provided in order for the tests to work.