ocket8888 commented on code in PR #7173:
URL: https://github.com/apache/trafficcontrol/pull/7173#discussion_r1014340359
##########
traffic_ops/testing/api/README.md:
##########
@@ -17,86 +17,101 @@
under the License.
-->
-# Traffic Ops API Tests
+# Traffic Ops Client / API Integration Tests
-The Traffic Ops Client API tests are used to validate the clients responses
against those from the Traffic Ops API.
+The Traffic Ops Client API tests are used to validate the clients responses
against those from the Traffic Ops API.
-The v1 tests are for regression purposes, and the v2 tests were forked from
them when Traffic Ops API v2 was merged. All further feature development will
only occur in v2.
+## Setup
-In order to run the tests you will need the following:
+In order to run the tests you will need a running instance of Traffic Ops and
Traffic Ops DB:
-1. Port access to both the Postgres port (usually 5432) that your Traffic Ops
instance is using as well as the Traffic Ops configured port (usually 443 or
60443).
+1. **Traffic Ops Database** configured port access
+ - _Usually 5432 - should match the value set in database.conf and the
**trafficOpsDB port** in traffic-ops-test.conf_
+2. **Traffic Ops** configured port access
+ - _Usually 443 or 60443 - should match the value set in cdn.conf and the
**URL** in traffic-ops-test.conf_
+3. Running Postgres instance with a `to_test` database that has empty tables.
+ - To set up the `to_test` database do the following:
-2. An instance of Postgres running with a `to_test` database that has empty
tables.
+ ```shell
+ $ cd trafficcontrol/traffic_ops/app
+ $ db/admin --env=test reset
+ ```
Review Comment:
I believe `shell` lexes the block as an actual shell script. To get
highlighting for a recording of a shell session, I think you want to use
`shellsession` (or its alias `console`). Otherwise it thinks that the command
is `$`
##########
traffic_ops/testing/api/README.md:
##########
@@ -17,86 +17,101 @@
under the License.
-->
-# Traffic Ops API Tests
+# Traffic Ops Client / API Integration Tests
-The Traffic Ops Client API tests are used to validate the clients responses
against those from the Traffic Ops API.
+The Traffic Ops Client API tests are used to validate the clients responses
against those from the Traffic Ops API.
-The v1 tests are for regression purposes, and the v2 tests were forked from
them when Traffic Ops API v2 was merged. All further feature development will
only occur in v2.
+## Setup
-In order to run the tests you will need the following:
+In order to run the tests you will need a running instance of Traffic Ops and
Traffic Ops DB:
-1. Port access to both the Postgres port (usually 5432) that your Traffic Ops
instance is using as well as the Traffic Ops configured port (usually 443 or
60443).
+1. **Traffic Ops Database** configured port access
+ - _Usually 5432 - should match the value set in database.conf and the
**trafficOpsDB port** in traffic-ops-test.conf_
+2. **Traffic Ops** configured port access
+ - _Usually 443 or 60443 - should match the value set in cdn.conf and the
**URL** in traffic-ops-test.conf_
+3. Running Postgres instance with a `to_test` database that has empty tables.
Review Comment:
This isn't actually true. The database can have whatever name you want as
long as it matches the value set in `database.conf` and
`traffic-ops-test.conf`. But also `to_test` is not the default; [the
default/sample configuration file in `traffic_ops/testing/api/conf` uses
`traffic_ops_development` as the
default](https://github.com/apache/trafficcontrol/blob/master/traffic_ops/testing/api/conf/traffic-ops-test.conf#L31).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]