Skip to content

Commit

Permalink
Fix the TP GHA Tests (#7791)
Browse files Browse the repository at this point in the history
Fix TP GHA

Co-authored-by: Steve Hamrick <shamrick@apache.org>
  • Loading branch information
shamrickus and shamrickus committed Sep 8, 2023
1 parent 3a43e40 commit 06504e3
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 59 deletions.
10 changes: 4 additions & 6 deletions .github/actions/tp-integration-tests/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ onFail() {
if [[ -f "${REPO_DIR}/traffic_ops/traffic_ops_golang/out.log" ]]; then
mv "${REPO_DIR}/traffic_ops/traffic_ops_golang/out.log" Reports/to.log
fi
docker logs $CHROMIUM_CONTAINER > Reports/chromium.log 2>&1;
docker logs $CHROME_CONTAINER > Reports/chromium.log 2>&1;
docker logs $HUB_CONTAINER > Reports/hub.log 2>&1;
echo "Detailed logs produced info Reports artifact"
exit 1
Expand Down Expand Up @@ -82,9 +82,9 @@ sudo apt-get install -y --no-install-recommends gettext curl

sudo npm i -g pm2 grunt sass

CHROMIUM_CONTAINER=$(docker ps -qf name=chromium)
CHROME_CONTAINER=$(docker ps -qf name=chrome)
HUB_CONTAINER=$(docker ps -qf name=hub)
CHROMIUM_VER=$(docker exec "$CHROMIUM_CONTAINER" chromium --version | grep -Eo '[0-9.]+')
CHROME_VER=$(docker exec "$CHROME_CONTAINER" google-chrome --version | grep -Eo '[0-9.]+')

export GOPATH="${HOME}/go"
readonly ORG_DIR="$GOPATH/src/github.com/apache"
Expand Down Expand Up @@ -124,7 +124,7 @@ popd
cd "${REPO_DIR}/traffic_portal/test/integration"
npm ci

npx webdriver-manager update --gecko false --versions.chrome "LATEST_RELEASE_$CHROMIUM_VER"
npx webdriver-manager update --gecko false --versions.chrome "LATEST_RELEASE_$CHROME_VER"

jq " .capabilities.chromeOptions.args = [
\"--headless\",
Expand All @@ -135,8 +135,6 @@ jq " .capabilities.chromeOptions.args = [
| .capabilities[\"goog:chromeOptions\"].w3c = false | .capabilities.chromeOptions.w3c = false" \
config.json > config.json.tmp && mv config.json.tmp config.json

npm run build

# Wait for tp/to build
timeout 5m bash <<TMOUT
while ! curl -Lvsk "${tp_fqdn}/api/5.0/ping" >/dev/null 2>&1; do
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tp.integration.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ jobs:
runs-on: ubuntu-latest
services:
hub:
image: selenium/hub
image: selenium/hub:4.8.1
ports:
- 4442:4442
- 4443:4443
- 4444:4444
options: --health-cmd=/opt/bin/check-grid.sh --health-interval=5s --health-timeout=15s --health-retries=5
chromium:
image: ossalternatives/selenium-node-chromium
chrome:
image: selenium/node-chrome:110.0
env:
SE_EVENT_BUS_HOST: hub
SE_EVENT_BUS_PUBLISH_PORT: 4442
Expand Down
97 changes: 48 additions & 49 deletions traffic_portal/test/integration/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion traffic_portal/test/integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"protractor-beautiful-reporter": "^1.3.6",
"protractor-html-reporter-2": "^1.0.4",
"random-ipv6": "^1.0.2",
"selenium-webdriver": "^4.0.0-alpha.8",
"selenium-webdriver": "^4.12.0",
"webdriver-manager": "^12.1.9",
"xlsx": "^0.17.0"
},
"devDependencies": {
Expand Down

0 comments on commit 06504e3

Please sign in to comment.