From 1a8bae5fa4d41237e6ea5ea724177b321a9eb323 Mon Sep 17 00:00:00 2001
From: Maxb <bittmanmax@gmail.com>
Date: Tue, 30 Apr 2024 08:34:04 -0700
Subject: [PATCH] Add integration test for hopping+kcp

---
 .env.hopping.kcp            |  4 ++++
 .gitlab-ci.yml              | 13 +++++++++++++
 scripts/integration-test.sh |  2 ++
 3 files changed, 19 insertions(+)
 create mode 100644 .env.hopping.kcp

diff --git a/.env.hopping.kcp b/.env.hopping.kcp
new file mode 100644
index 0000000..ff6e140
--- /dev/null
+++ b/.env.hopping.kcp
@@ -0,0 +1,4 @@
+PROTO="udp"
+HOP_PT="1"
+KCP="1"
+PORT="4430"
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 14e9f7a..0c6394b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -88,6 +88,19 @@ integration-test-kcp:
     - linux
     - docker-in-docker
 
+integration-test-hopping-kcp:
+  image: docker:dind
+  stage: test
+  services:
+    - name: docker:dind
+      alias: docker
+  script:
+    - apk add --update bash
+    - /bin/bash ./scripts/integration-test.sh hop-kcp
+  tags:
+    - linux
+    - docker-in-docker
+
 # We can build the client separately here
 build-client:
   extends: build
diff --git a/scripts/integration-test.sh b/scripts/integration-test.sh
index 7bae6a8..053853f 100755
--- a/scripts/integration-test.sh
+++ b/scripts/integration-test.sh
@@ -15,6 +15,8 @@ if [[ "$1" == "hop" ]]; then
   env_file=./.env.hopping
 elif [[ "$1" == "kcp" ]]; then
   env_file=./.env.kcp
+elif [[ "$1" == "hop-kcp" ]]; then
+  env_file=./.env.hopping.kcp
 fi
 
 docker-compose down --rmi all -v
-- 
GitLab