You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zr...@apache.org on 2021/12/09 08:12:12 UTC

[camel-website] branch main updated: chore: run redirect test as a part of checks

This is an automated email from the ASF dual-hosted git repository.

zregvart pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-website.git


The following commit(s) were added to refs/heads/main by this push:
     new 9224e2c  chore: run redirect test as a part of checks
9224e2c is described below

commit 9224e2cce44f6c1f06ac02e109279e29a2fd7941
Author: Zoran Regvart <zo...@regvart.com>
AuthorDate: Wed Dec 8 21:49:45 2021 +0100

    chore: run redirect test as a part of checks
    
    This makes sure that we run the redirect tests as a part of regular
    checks so we don't unintentionally break redirects.
    
    The `test/redirect.sh` now supports these new parameters:
     - `-s` - start a container with Apache HTTP server and test against it
     - `-v` - verbose test output (print a line for each test)
     - `-x` - verbose script output (equivalent of `set -x`)
---
 Jenkinsfile            |  16 ++-
 package.json           |   3 +-
 support/docker-pipe.sh |  74 ++++++++++++++
 tests/redirect.sh      | 261 +++++++++++++++++++++++++++++++------------------
 4 files changed, 256 insertions(+), 98 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 5337770..346c897 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -61,13 +61,19 @@ pipeline {
             }
         }
 
+        stage('Setup') {
+          steps {
+            sh "$WORKSPACE/camel-website/support/docker-pipe.sh $WORKSPACE/docker-pipe &"
+          }
+        }
+
         stage('Checks') {
             agent {
                 dockerfile {
                     dir 'camel-website'
                     label "$NODE"
                     reuseNode true
-                    args '-u root'
+                    args "-u root -v $WORKSPACE/docker-pipe/docker:/usr/bin/docker"
                 }
             }
 
@@ -97,6 +103,12 @@ pipeline {
                     sh 'git push --force origin asf-site'
                 }
             }
-       }
+        }
+    }
+
+    post {
+        always {
+            sh "$WORKSPACE/docker-pipe/teardown.sh"
+        }
     }
 }
diff --git a/package.json b/package.json
index 9d4cfbd..7694979 100644
--- a/package.json
+++ b/package.json
@@ -12,7 +12,8 @@
     "build:htaccess": "gulp htaccess",
     "check:html": "html-validate public",
     "check:links": "deadlinks-linux public",
-    "checks": "run-s check:links check:html",
+    "check:redirects": "tests/redirect.sh -s",
+    "checks": "run-s check:links check:html check:redirects",
     "clean": "gulp clean",
     "check:dependencies": "run-p check:cache check:dedupe",
     "check:cache": "yarn workspaces foreach install --immutable --immutable-cache --check-cache",
diff --git a/support/docker-pipe.sh b/support/docker-pipe.sh
new file mode 100755
index 0000000..0a66255
--- /dev/null
+++ b/support/docker-pipe.sh
@@ -0,0 +1,74 @@
+#!/bin/bash
+# When running on ASF Jenkins at ci-builds.a.o we're running in a container
+# so when trying to run docker from within a container even with the mounted
+# Docker socket and binary we run into permission issues. This circumvents
+# that problem by creating a pair of in-out pipes outside of the container
+# to which a process within a container can write/read from to access the
+# docker CLI on the host.
+# The script creates the `teardown.sh` and `docker-wrapper` scripts in
+# addition to the in-out pipes. The `docker-wrapper` is meant to be mounted
+# within the container at `/usr/bin/docker` and `teardown.sh` is meant to
+# be called when the wrapper is no longer needed, to terminate it (as it's
+# meant to run in the background) and cleanup created files.
+set -euo pipefail
+WHERE=$(realpath "$1")
+
+mkdir -p "$WHERE"
+
+IN="$(mktemp -p "$WHERE" -u in.XXXXXXXXXXXXXXXXXXXX)"
+OUT="$(mktemp -p "$WHERE" -u out.XXXXXXXXXXXXXXXXXXXX)"
+ERR="$(mktemp -p "$WHERE" -u err.XXXXXXXXXXXXXXXXXXXX)"
+STATUS="$(mktemp -p "$WHERE" -u status.XXXXXXXXXXXXXXXXXXXX)"
+
+trap 'rm -f "$IN" "$OUT" "$ERR" "$STATUS" "$WHERE/teardown.sh" "${WHERE}/docker"; rmdir --ignore-fail-on-non-empty "$WHERE"' EXIT
+
+cat <<EOF > "$WHERE/teardown.sh"
+#!/bin/bash
+kill $$
+EOF
+chmod +x "$WHERE/teardown.sh"
+
+cat <<EOF > "${WHERE}/docker"
+#!/bin/bash
+CMD=''
+CNT=0
+for arg; do
+  if [ \$CNT == 1 ]; then
+    CMD+=' '
+  else
+    CNT=1
+  fi
+  if [[ "\$arg" == *' '* ]]; then
+    CMD+="'"\$arg"'"
+  else
+    CMD+="\$arg"
+  fi
+done
+echo \$CMD > "$IN"
+EXIT_CODE=\$(cat "$STATUS")
+cat "$OUT"
+cat "$ERR" >&2
+exit \$EXIT_CODE
+EOF
+chmod +x "${WHERE}/docker"
+
+mkfifo "$IN"
+mkfifo "$OUT"
+mkfifo "$ERR"
+mkfifo "$STATUS"
+
+while true; do
+  CMD_OUT=$(mktemp -u stdout.XXXXXXXXXXXXXXXXXXX)
+  CMD_ERR=$(mktemp -u stdout.XXXXXXXXXXXXXXXXXXX)
+  CMD=$(mktemp -u cmd.XXXXXXXXXXXXXXXXXXX)
+  echo "docker $(cat "$IN")" > "$CMD"
+  chmod +x "$CMD"
+  set +e
+  "./$CMD" 2> "$CMD_ERR" > "$CMD_OUT"
+  echo $? > "$STATUS"
+  rm -f "$CMD"
+  set -e
+  cat "$CMD_OUT" > "$OUT"
+  cat "$CMD_ERR" > "$ERR"
+  rm -f "$CMD_OUT" "$CMD_ERR"
+done
diff --git a/tests/redirect.sh b/tests/redirect.sh
index 49e8124..dec8c7b 100755
--- a/tests/redirect.sh
+++ b/tests/redirect.sh
@@ -1,106 +1,177 @@
-#!/bin/sh
+#!/bin/bash
 
-BASE_URL="${1:-https://localhost}"
+set -eu -o pipefail
+
+BASE_URL="https://localhost"
+VERBOSE=0
+DEBUG=0
+SERVE=0
+while [[ $# -gt 0 ]]; do
+  opt="$1"
+
+  case $opt in
+    -v|--verbose)
+      VERBOSE=1
+      shift
+      ;;
+    -x|--very-verbose)
+      set -x
+      DEBUG=1
+      shift
+      ;;
+    -s|--serve)
+      SERVE=1
+      shift
+      ;;
+    *)
+      BASE_URL="$1"
+      shift
+      ;;
+  esac
+done
+
+GIT_ROOT=$(realpath "$(dirname "${BASH_SOURCE[0]}")/..")
+
+if [ "$SERVE" == 1 ]; then
+  CONTAINER_CMD=podman
+  if ! command -v $CONTAINER_CMD &> /dev/null; then
+    CONTAINER_CMD=docker
+    if ! command -v $CONTAINER_CMD &> /dev/null; then
+      echo -e "\e[1mFAILURE\e[0m: Nether podman nor docker command found"
+      exit 1
+    fi
+  fi
+
+  CONTAINER_ID=$($CONTAINER_CMD run -d -v "$GIT_ROOT/public":/usr/local/apache2/htdocs/:Z -v "$GIT_ROOT/support/http":/support:Z -p 443 httpd:2.4 /bin/bash -c "cp /support/* /usr/local/apache2/conf/ && httpd-foreground")
+  trap '$CONTAINER_CMD stop $CONTAINER_ID > /dev/null; $CONTAINER_CMD rm $CONTAINER_ID > /dev/null' EXIT
+  if [ "$DEBUG" == 1 ]; then
+    $CONTAINER_CMD logs "$CONTAINER_ID"
+  fi
+  if [ -n "$($CONTAINER_CMD ps -q --filter id="$(hostname)")" ]; then
+    # running within a container, we'll assume running on the same network, so we should be able to connect directly
+    BASE_URL="https://$($CONTAINER_CMD inspect -f "{{ range .NetworkSettings.Networks }}{{.IPAddress}}{{ end }}" "$CONTAINER_ID")"
+  else
+    BASE_URL="https://$($CONTAINER_CMD port "$CONTAINER_ID" 443 | head -1)"
+  fi
+fi
+
+TOTAL=0
+SUCCESS=0
 
 function test {
   local url=$1
   local code=$2
-  local location=$3
+  local location=${3:-}
 
-  local output=$(curl -k -w '%{http_code},%{redirect_url}\n' -o /dev/null -s "${url}")
+  local output
+  set +e
+  output=$(curl -k -w '%{http_code},%{redirect_url}\n' -o /dev/null -s "${url}")
+  set -e
+  TOTAL=$((TOTAL + 1))
 
-  if [ "${output}" == "${code},${location}" ]; then 
-    echo " OK : ${url}"
+  if [ "${output}" == "${code},${location}" ]; then
+    SUCCESS=$((SUCCESS + 1))
+    if [ "${VERBOSE}" == 1 ]; then
+      echo -e " OK : ${url}"
+    fi
   else
-    echo "FAIL: ${url} -> ${code},${location} != ${output}"
+    echo -e "\e[1m\e[31mFAIL\e[m: ${url}\n    expected: \e[1m${code},${location}\e[0m\n         got: \e[1m${output}\e[0m"
   fi
 }
 
-C_V="3.13.x"
-CK_V="1.6.x"
-CKC_V="0.11.0"
-CQ_V="2.4.x"
-
-test $BASE_URL/components 302 $BASE_URL/components/${C_V}/
-test $BASE_URL/components/ 302 $BASE_URL/components/${C_V}/
-test $BASE_URL/components/next 301 $BASE_URL/components/next/
-test $BASE_URL/components/next/ 200
-test $BASE_URL/components/latest 302 $BASE_URL/components/${C_V}
-test $BASE_URL/components/latest/ 302 $BASE_URL/components/${C_V}/
-test $BASE_URL/components/activemq-component.html 302 $BASE_URL/components/${C_V}/activemq-component.html
-test $BASE_URL/components/latest/activemq-component.html 302 $BASE_URL/components/${C_V}/activemq-component.html
-test $BASE_URL/components/${C_V}/activemq-component.html 200
-test $BASE_URL/components/next/activemq-component.html 200
-
-test $BASE_URL/camel-spring-boot 302 $BASE_URL/camel-spring-boot/${C_V}/
-test $BASE_URL/camel-spring-boot/ 302 $BASE_URL/camel-spring-boot/${C_V}/
-test $BASE_URL/camel-spring-boot/next 301 $BASE_URL/camel-spring-boot/next/
-test $BASE_URL/camel-spring-boot/next/ 200
-test $BASE_URL/camel-spring-boot/latest 302 $BASE_URL/camel-spring-boot/${C_V}
-test $BASE_URL/camel-spring-boot/latest/ 302 $BASE_URL/camel-spring-boot/${C_V}/
-test $BASE_URL/camel-spring-boot/list.html 302 $BASE_URL/camel-spring-boot/${C_V}/list.html
-test $BASE_URL/camel-spring-boot/latest/list.html 302 $BASE_URL/camel-spring-boot/${C_V}/list.html
-test $BASE_URL/camel-spring-boot/${C_V}/list.html 200
-test $BASE_URL/camel-spring-boot/next/list.html 200
-
-test $BASE_URL/camel-k 302 $BASE_URL/camel-k/${CK_V}/
-test $BASE_URL/camel-k/ 302 $BASE_URL/camel-k/${CK_V}/
-test $BASE_URL/camel-k/next 301 $BASE_URL/camel-k/next/
-test $BASE_URL/camel-k/next/ 200
-test $BASE_URL/camel-k/latest 302 $BASE_URL/camel-k/${CK_V}
-test $BASE_URL/camel-k/latest/ 302 $BASE_URL/camel-k/${CK_V}/
-test $BASE_URL/camel-k/traits/master.html 302 $BASE_URL/camel-k/${CK_V}/traits/master.html
-test $BASE_URL/camel-k/latest/traits/master.html 302 $BASE_URL/camel-k/${CK_V}/traits/master.html
-test $BASE_URL/camel-k/${CK_V}/traits/master.html 200
-test $BASE_URL/camel-k/next/traits/master.html 200
-
-test $BASE_URL/camel-karaf 302 $BASE_URL/camel-karaf/${C_V}/
-test $BASE_URL/camel-karaf/ 302 $BASE_URL/camel-karaf/${C_V}/
-test $BASE_URL/camel-karaf/next 301 $BASE_URL/camel-karaf/next/
-test $BASE_URL/camel-karaf/next/ 200
-test $BASE_URL/camel-karaf/latest 302 $BASE_URL/camel-karaf/${C_V}
-test $BASE_URL/camel-karaf/latest/ 302 $BASE_URL/camel-karaf/${C_V}/
-test $BASE_URL/camel-karaf/latest/components.html 302 $BASE_URL/camel-karaf/${C_V}/components.html
-test $BASE_URL/camel-karaf/latest/components.html 302 $BASE_URL/camel-karaf/${C_V}/components.html
-test $BASE_URL/camel-karaf/${C_V}/components.html 200
-test $BASE_URL/camel-karaf/next/components.html 200
-
-test $BASE_URL/camel-kafka-connector 302 $BASE_URL/camel-kafka-connector/${CKC_V}/
-test $BASE_URL/camel-kafka-connector/ 302 $BASE_URL/camel-kafka-connector/${CKC_V}/
-test $BASE_URL/camel-kafka-connector/next 301 $BASE_URL/camel-kafka-connector/next/
-test $BASE_URL/camel-kafka-connector/next/ 200
-test $BASE_URL/camel-kafka-connector/latest 302 $BASE_URL/camel-kafka-connector/${CKC_V}
-test $BASE_URL/camel-kafka-connector/latest/ 302 $BASE_URL/camel-kafka-connector/${CKC_V}/
-test $BASE_URL/camel-kafka-connector/contributor-guide/release-guide.html 302 $BASE_URL/camel-kafka-connector/${CKC_V}/contributor-guide/release-guide.html
-test $BASE_URL/camel-kafka-connector/latest/contributor-guide/release-guide.html 302 $BASE_URL/camel-kafka-connector/${CKC_V}/contributor-guide/release-guide.html
-test $BASE_URL/camel-kafka-connector/${CKC_V}/contributor-guide/release-guide.html 200
-test $BASE_URL/camel-kafka-connector/next/contributor-guide/release-guide.html 200
-
-test $BASE_URL/camel-kamelets 302 $BASE_URL/camel-kamelets/next/
-test $BASE_URL/camel-kamelets/ 302 $BASE_URL/camel-kamelets/next/
-test $BASE_URL/camel-kamelets/next 301 $BASE_URL/camel-kamelets/next/
-test $BASE_URL/camel-kamelets/next/ 200
-test $BASE_URL/camel-kamelets/latest 302 $BASE_URL/camel-kamelets/next
-test $BASE_URL/camel-kamelets/latest/ 302 $BASE_URL/camel-kamelets/next/
-test $BASE_URL/camel-kamelets/github-source.html 302 $BASE_URL/camel-kamelets/next/github-source.html
-test $BASE_URL/camel-kamelets/latest/github-source.html 302 $BASE_URL/camel-kamelets/next/github-source.html
-test $BASE_URL/camel-kamelets/next/github-source.html 200
-test $BASE_URL/camel-kamelets/next/github-source.html 200
-
-test $BASE_URL/camel-quarkus 302 $BASE_URL/camel-quarkus/${CQ_V}/
-test $BASE_URL/camel-quarkus/ 302 $BASE_URL/camel-quarkus/${CQ_V}/
-test $BASE_URL/camel-quarkus/next 301 $BASE_URL/camel-quarkus/next/
-test $BASE_URL/camel-quarkus/next/ 200
-test $BASE_URL/camel-quarkus/latest 302 $BASE_URL/camel-quarkus/${CQ_V}
-test $BASE_URL/camel-quarkus/latest/ 302 $BASE_URL/camel-quarkus/${CQ_V}/
-test $BASE_URL/camel-quarkus/user-guide/cdi.html 302 $BASE_URL/camel-quarkus/${CQ_V}/user-guide/cdi.html
-test $BASE_URL/camel-quarkus/latest/user-guide/cdi.html 302 $BASE_URL/camel-quarkus/${CQ_V}/user-guide/cdi.html
-test $BASE_URL/camel-quarkus/${CQ_V}/user-guide/cdi.html 200
-test $BASE_URL/camel-quarkus/next/user-guide/cdi.html 200
-
-test $BASE_URL/manual 301 $BASE_URL/manual/
-test $BASE_URL/manual/latest 302 $BASE_URL/manual
-test $BASE_URL/manual/latest/ 302 $BASE_URL/manual/
-test $BASE_URL/manual/latest/component-dsl.html 302 $BASE_URL/manual/component-dsl.html
-test $BASE_URL/manual/ 200
-test $BASE_URL/manual/component-dsl.html 200
+COMPONENTS_VERSION="$(grep 'components/latest' "$GIT_ROOT/documentation/.htaccess" | grep -Z -o '[^/]*$')"
+CAMEL_K_VERSION="$(grep 'camel-k/latest' "$GIT_ROOT/documentation/.htaccess" | grep -Z -o '[^/]*$')"
+CAMEL_KAFKA_CONNECTOR_VERSION="$(grep 'camel-kafka-connector/latest' "$GIT_ROOT/documentation/.htaccess" | grep -Z -o '[^/]*$')"
+CAMEL_QUARKUS_VERSION="$(grep 'camel-quarkus/latest' "$GIT_ROOT/documentation/.htaccess" | grep -Z -o '[^/]*$')"
+CAMEL_KAMELETS_VERSION="$(grep 'camel-kamelets/latest' "$GIT_ROOT/documentation/.htaccess" | grep -Z -o '[^/]*$')"
+
+test "$BASE_URL/components" 302 "$BASE_URL/components/${COMPONENTS_VERSION}/"
+test "$BASE_URL/components/" 302 "$BASE_URL/components/${COMPONENTS_VERSION}/"
+test "$BASE_URL/components/next" 301 "$BASE_URL/components/next/"
+test "$BASE_URL/components/next/" 200
+test "$BASE_URL/components/latest" 302 "$BASE_URL/components/${COMPONENTS_VERSION}"
+test "$BASE_URL/components/latest/" 302 "$BASE_URL/components/${COMPONENTS_VERSION}/"
+test "$BASE_URL/components/activemq-component.html" 302 "$BASE_URL/components/${COMPONENTS_VERSION}/activemq-component.html"
+test "$BASE_URL/components/latest/activemq-component.html" 302 "$BASE_URL/components/${COMPONENTS_VERSION}/activemq-component.html"
+test "$BASE_URL/components/${COMPONENTS_VERSION}/activemq-component.html" 200
+test "$BASE_URL/components/next/activemq-component.html" 200
+
+test "$BASE_URL/camel-spring-boot" 302 "$BASE_URL/camel-spring-boot/${COMPONENTS_VERSION}/"
+test "$BASE_URL/camel-spring-boot/" 302 "$BASE_URL/camel-spring-boot/${COMPONENTS_VERSION}/"
+test "$BASE_URL/camel-spring-boot/next" 301 "$BASE_URL/camel-spring-boot/next/"
+test "$BASE_URL/camel-spring-boot/next/" 200
+test "$BASE_URL/camel-spring-boot/latest" 302 "$BASE_URL/camel-spring-boot/${COMPONENTS_VERSION}"
+test "$BASE_URL/camel-spring-boot/latest/" 302 "$BASE_URL/camel-spring-boot/${COMPONENTS_VERSION}/"
+test "$BASE_URL/camel-spring-boot/list.html" 302 "$BASE_URL/camel-spring-boot/${COMPONENTS_VERSION}/list.html"
+test "$BASE_URL/camel-spring-boot/latest/list.html" 302 "$BASE_URL/camel-spring-boot/${COMPONENTS_VERSION}/list.html"
+test "$BASE_URL/camel-spring-boot/${COMPONENTS_VERSION}/list.html" 200
+test "$BASE_URL/camel-spring-boot/next/list.html" 200
+
+test "$BASE_URL/camel-k" 302 "$BASE_URL/camel-k/${CAMEL_K_VERSION}/"
+test "$BASE_URL/camel-k/" 302 "$BASE_URL/camel-k/${CAMEL_K_VERSION}/"
+test "$BASE_URL/camel-k/next" 301 "$BASE_URL/camel-k/next/"
+test "$BASE_URL/camel-k/next/" 200
+test "$BASE_URL/camel-k/latest" 302 "$BASE_URL/camel-k/${CAMEL_K_VERSION}"
+test "$BASE_URL/camel-k/latest/" 302 "$BASE_URL/camel-k/${CAMEL_K_VERSION}/"
+test "$BASE_URL/camel-k/traits/master.html" 302 "$BASE_URL/camel-k/${CAMEL_K_VERSION}/traits/master.html"
+test "$BASE_URL/camel-k/latest/traits/master.html" 302 "$BASE_URL/camel-k/${CAMEL_K_VERSION}/traits/master.html"
+test "$BASE_URL/camel-k/${CAMEL_K_VERSION}/traits/master.html" 200
+test "$BASE_URL/camel-k/next/traits/master.html" 200
+
+test "$BASE_URL/camel-karaf" 302 "$BASE_URL/camel-karaf/${COMPONENTS_VERSION}/"
+test "$BASE_URL/camel-karaf/" 302 "$BASE_URL/camel-karaf/${COMPONENTS_VERSION}/"
+test "$BASE_URL/camel-karaf/next" 301 "$BASE_URL/camel-karaf/next/"
+test "$BASE_URL/camel-karaf/next/" 200
+test "$BASE_URL/camel-karaf/latest" 302 "$BASE_URL/camel-karaf/${COMPONENTS_VERSION}"
+test "$BASE_URL/camel-karaf/latest/" 302 "$BASE_URL/camel-karaf/${COMPONENTS_VERSION}/"
+test "$BASE_URL/camel-karaf/latest/components.html" 302 "$BASE_URL/camel-karaf/${COMPONENTS_VERSION}/components.html"
+test "$BASE_URL/camel-karaf/latest/components.html" 302 "$BASE_URL/camel-karaf/${COMPONENTS_VERSION}/components.html"
+test "$BASE_URL/camel-karaf/${COMPONENTS_VERSION}/components.html" 200
+test "$BASE_URL/camel-karaf/next/components.html" 200
+
+test "$BASE_URL/camel-kafka-connector" 302 "$BASE_URL/camel-kafka-connector/${CAMEL_KAFKA_CONNECTOR_VERSION}/"
+test "$BASE_URL/camel-kafka-connector/" 302 "$BASE_URL/camel-kafka-connector/${CAMEL_KAFKA_CONNECTOR_VERSION}/"
+test "$BASE_URL/camel-kafka-connector/next" 301 "$BASE_URL/camel-kafka-connector/next/"
+test "$BASE_URL/camel-kafka-connector/next/" 200
+test "$BASE_URL/camel-kafka-connector/latest" 302 "$BASE_URL/camel-kafka-connector/${CAMEL_KAFKA_CONNECTOR_VERSION}"
+test "$BASE_URL/camel-kafka-connector/latest/" 302 "$BASE_URL/camel-kafka-connector/${CAMEL_KAFKA_CONNECTOR_VERSION}/"
+test "$BASE_URL/camel-kafka-connector/contributor-guide/release-guide.html" 302 "$BASE_URL/camel-kafka-connector/${CAMEL_KAFKA_CONNECTOR_VERSION}/contributor-guide/release-guide.html"
+test "$BASE_URL/camel-kafka-connector/latest/contributor-guide/release-guide.html" 302 "$BASE_URL/camel-kafka-connector/${CAMEL_KAFKA_CONNECTOR_VERSION}/contributor-guide/release-guide.html"
+test "$BASE_URL/camel-kafka-connector/${CAMEL_KAFKA_CONNECTOR_VERSION}/contributor-guide/release-guide.html" 200
+test "$BASE_URL/camel-kafka-connector/next/contributor-guide/release-guide.html" 200
+
+test "$BASE_URL/camel-kamelets" 302 "$BASE_URL/camel-kamelets/${CAMEL_KAMELETS_VERSION}/"
+test "$BASE_URL/camel-kamelets/" 302 "$BASE_URL/camel-kamelets/${CAMEL_KAMELETS_VERSION}/"
+test "$BASE_URL/camel-kamelets/next" 301 "$BASE_URL/camel-kamelets/next/"
+test "$BASE_URL/camel-kamelets/next/" 200
+test "$BASE_URL/camel-kamelets/latest" 302 "$BASE_URL/camel-kamelets/${CAMEL_KAMELETS_VERSION}"
+test "$BASE_URL/camel-kamelets/latest/" 302 "$BASE_URL/camel-kamelets/${CAMEL_KAMELETS_VERSION}/"
+test "$BASE_URL/camel-kamelets/github-source.html" 302 "$BASE_URL/camel-kamelets/${CAMEL_KAMELETS_VERSION}/github-source.html"
+test "$BASE_URL/camel-kamelets/latest/github-source.html" 302 "$BASE_URL/camel-kamelets/${CAMEL_KAMELETS_VERSION}/github-source.html"
+test "$BASE_URL/camel-kamelets/next/github-source.html" 200
+test "$BASE_URL/camel-kamelets/next/github-source.html" 200
+
+test "$BASE_URL/camel-quarkus" 302 "$BASE_URL/camel-quarkus/${CAMEL_QUARKUS_VERSION}/"
+test "$BASE_URL/camel-quarkus/" 302 "$BASE_URL/camel-quarkus/${CAMEL_QUARKUS_VERSION}/"
+test "$BASE_URL/camel-quarkus/next" 301 "$BASE_URL/camel-quarkus/next/"
+test "$BASE_URL/camel-quarkus/next/" 200
+test "$BASE_URL/camel-quarkus/latest" 302 "$BASE_URL/camel-quarkus/${CAMEL_QUARKUS_VERSION}"
+test "$BASE_URL/camel-quarkus/latest/" 302 "$BASE_URL/camel-quarkus/${CAMEL_QUARKUS_VERSION}/"
+test "$BASE_URL/camel-quarkus/user-guide/cdi.html" 302 "$BASE_URL/camel-quarkus/${CAMEL_QUARKUS_VERSION}/user-guide/cdi.html"
+test "$BASE_URL/camel-quarkus/latest/user-guide/cdi.html" 302 "$BASE_URL/camel-quarkus/${CAMEL_QUARKUS_VERSION}/user-guide/cdi.html"
+test "$BASE_URL/camel-quarkus/${CAMEL_QUARKUS_VERSION}/user-guide/cdi.html" 200
+test "$BASE_URL/camel-quarkus/next/user-guide/cdi.html" 200
+
+test "$BASE_URL/manual" 301 "$BASE_URL/manual/"
+test "$BASE_URL/manual/latest" 302 "$BASE_URL/manual"
+test "$BASE_URL/manual/latest/" 302 "$BASE_URL/manual/"
+test "$BASE_URL/manual/latest/component-dsl.html" 302 "$BASE_URL/manual/component-dsl.html"
+test "$BASE_URL/manual/" 200
+test "$BASE_URL/manual/component-dsl.html" 200
+
+if [ "$TOTAL" == "$SUCCESS" ]; then
+  echo -e "$0 \e[1mSUCCESSFULLY\e[0m ran $TOTAL tests"
+else
+  echo -e "$0 \e[1m\e[31mFAILURE\e[0m: $((TOTAL - SUCCESS)) tests failed out of ${TOTAL}"
+  exit 1
+fi