You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2020/10/21 18:07:55 UTC

[GitHub] [trafficcontrol] zrhoffman commented on a change in pull request #5168: Enable includeSystemTests in the API tests GitHub Action

zrhoffman commented on a change in pull request #5168:
URL: https://github.com/apache/trafficcontrol/pull/5168#discussion_r509535557



##########
File path: .github/actions/to-integration-tests/entrypoint.sh
##########
@@ -26,6 +26,46 @@ download_go() {
 }
 download_go
 
+ciab_dir="${GITHUB_WORKSPACE}/infrastructure/cdn-in-a-box";
+trafficvault=trafficvault;
+start_traffic_vault() {
+<<-'BASH_LINES' cat >infrastructure/cdn-in-a-box/traffic_vault/prestart.d/00-0-standalone-config.sh;
+		TV_FQDN="${TV_HOST}.${INFRA_SUBDOMAIN}.${TLD_DOMAIN}" # Also used in 02-add-search-schema.sh
+		certs_dir=/etc/ssl/certs;
+		X509_INFRA_CERT_FILE="${certs_dir}/trafficvault.crt";
+		X509_INFRA_KEY_FILE="${certs_dir}/trafficvault.key";
+
+		# Generate x509 certificate
+		openssl req -new -x509 -nodes -newkey rsa:4096 -out "$X509_INFRA_CERT_FILE" -keyout "$X509_INFRA_KEY_FILE" -subj "/CN=${TV_FQDN}";
+
+		# Do not wait for CDN in a Box to generate SSL keys
+		sed -i '0,/^update-ca-certificates/d' /etc/riak/prestart.d/00-config.sh;
+
+		# Do not try to source to-access.sh
+		sed -i '/to-access\.sh/d' /etc/riak/{prestart.d,poststart.d}/*
+	BASH_LINES
+
+	DOCKER_BUILDKIT=1 docker build "$ciab_dir" -f "${ciab_dir}/traffic_vault/Dockerfile" -t "$trafficvault";
+	network="$(docker network ls --quiet --filter name=github_network)";
+	if [[ "$INPUT_VERSION" -lt 3 ]]; then

Review comment:
       Having TV enabled the whole time would add 4-5 minutes to the workflow because
   * Right now, it builds Traffic Vault while running the API tests
   * It starts Traffic Vault in the background while running the API tests andit sort works out that it's up and running before it's used by `TestDeliveryServices` in v3
   
   While log messages are useful, if there really is a bug related to that, ideally we would have an API for it instead of relying on scanning the logs.
   
   One thing that makes scanning the logs trickier is that the Traffic Ops error log is only shown after the tests have finished running, so seeing log messages that correspond with certain points in the tests is not straightforward. I have changed 2 things in 9c915d9eb5 to make seeing Traffic Ops errors and warnings easier:
   * Now the logs show up in real time instead of after tests have run
   * Traffic Ops warnings are shown with a red background and warnings are shown with a yellow, so they are easy to spot (not sure why, but I don't see any TO warnings anyway).
   
   Will that work?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org