ocket8888 commented on a change in pull request #4959:
URL: https://github.com/apache/trafficcontrol/pull/4959#discussion_r472520126



##########
File path: .github/actions/to-integration-tests/entrypoint.sh
##########
@@ -0,0 +1,111 @@
+#!/bin/sh -l
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+GOPATH="$(mktemp -d)"
+SRCDIR="$GOPATH/src/github.com/apache"
+mkdir -p "$SRCDIR"
+ln -s "$PWD" "$SRCDIR/trafficcontrol"
+
+cd "$SRCDIR/trafficcontrol/traffic_ops/traffic_ops_golang"
+
+
+/usr/local/go/bin/go get ./...
+/usr/local/go/bin/go build .
+
+echo "
+-----BEGIN CERTIFICATE-----
+MIIDtTCCAp2gAwIBAgIJAJgQuE9T48+gMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV
+BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX
+aWRnaXRzIFB0eSBMdGQwHhcNMTcwNTA5MDIyNTI0WhcNMTgwNTA5MDIyNTI0WjBF
+MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50
+ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
+CgKCAQEA1OsuQ71qaSZ4ivGnh4YryeQEHMn5wZLX7kWYB637ssyOJnkU1ZGs93JM
+XJADzsjmssP6icSDhV2JPgDDYzx1eBJt6y3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Y5MttM/yLvwPKUZeng57PDqucV9zzkuoKfiCdXCcRpaGDEp
+okOooghj4ip204WDg6NTDZkCgYEAwZTfzsGLgmF1kRBIoZqmt1zeUcQxHfhKx32Y
+BaM7/EtD/rSEAz7NEtBa9uLOL77rlSdZL3KcGXck0efFckitFkCqtIQBAoaf1E12
+vS9tV0/6QBAjZByhgM0Qnt/Uad7k2/vilUmZ9TkoMVy9kdm3xCFCowP14OKb+uK4
+YxBQc7ECgYEAm7eVtNlPHYmC54FU2bLucryNMLmu9I8O6zvbK5sxiMdtlh7OjaUB
+RQS5iVc0iTacDZTGh7eqNzgGplj76pWGHeZUy0xIj/ZIRu2qOy0v+ffqfX1wCz7p
+A22D22wvfs7CE3cUz/8UnvLM3kbTTu1WbbBbrHjAV47sAHjW/ckTqeo=
+-----END RSA PRIVATE KEY-----
+" > localhost.key
+
+envsubst </cdn.json >cdn.conf
+mv /database.json ./database.conf
+
+./traffic_ops_golang --cfg ./cdn.conf --dbcfg ./database.conf >out.log 
2>err.log &

Review comment:
       stdout won't contain anything too helpful, I pretty much just do that to 
avoid writing to closed file descriptors, just in case. info, event, and debug 
logging is piped to `/dev/null` by the logging configuration. I tried including 
those in stderr as well, but the resulting logs after the tests finished were 
so large my browser refused to load the checks page that printed them. One day, 
we can put the entire log in a build artifact, so at that point we don't need 
to worry about what the GH UI can handle and can include everything in one 
stream.




----------------------------------------------------------------
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:
[email protected]


Reply via email to