You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2023/10/24 07:55:13 UTC
[incubator-opendal] branch main updated: refactor(services/redis): migrate to test planner for kvrocks,dragonfly (#3369)
This is an automated email from the ASF dual-hosted git repository.
xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git
The following commit(s) were added to refs/heads/main by this push:
new 6e5197ac5 refactor(services/redis): migrate to test planner for kvrocks,dragonfly (#3369)
6e5197ac5 is described below
commit 6e5197ac577a4df786a59d076a423bea12410863
Author: Suyan <su...@gmail.com>
AuthorDate: Tue Oct 24 15:55:07 2023 +0800
refactor(services/redis): migrate to test planner for kvrocks,dragonfly (#3369)
refactor(services/redis): migrate to test planner for kvrocks & dragonfly
Signed-off-by: suyanhanx <su...@gmail.com>
---
.github/services/redis/dragonfly/action.yml | 35 ++++++++++++++++++++++
.github/services/redis/kvrocks/action.yml | 35 ++++++++++++++++++++++
.github/workflows/service_test_redis.yml | 46 -----------------------------
fixtures/redis/docker-compose-dragonfly.yml | 24 +++++++++++++++
fixtures/redis/docker-compose-kvrocks.yml | 24 +++++++++++++++
5 files changed, 118 insertions(+), 46 deletions(-)
diff --git a/.github/services/redis/dragonfly/action.yml b/.github/services/redis/dragonfly/action.yml
new file mode 100644
index 000000000..71e271f5c
--- /dev/null
+++ b/.github/services/redis/dragonfly/action.yml
@@ -0,0 +1,35 @@
+# 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.
+
+name: dragonfly
+description: 'Behavior test for dragonfly'
+
+runs:
+ using: "composite"
+ steps:
+ - name: Setup Dragonfly Server
+ shell: bash
+ working-directory: fixtures/redis
+ run: docker-compose -f docker-compose-dragonfly.yml up -d
+ - name: Setup
+ shell: bash
+ run: |
+ cat << EOF >> $GITHUB_ENV
+ OPENDAL_REDIS_ENDPOINT=tcp://127.0.0.1:6379
+ OPENDAL_REDIS_ROOT=/
+ OPENDAL_REDIS_DB=0
+ EOF
diff --git a/.github/services/redis/kvrocks/action.yml b/.github/services/redis/kvrocks/action.yml
new file mode 100644
index 000000000..64978bf44
--- /dev/null
+++ b/.github/services/redis/kvrocks/action.yml
@@ -0,0 +1,35 @@
+# 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.
+
+name: kvrocks
+description: 'Behavior test for kvrocks'
+
+runs:
+ using: "composite"
+ steps:
+ - name: Setup Kvrocks Server
+ shell: bash
+ working-directory: fixtures/redis
+ run: docker-compose -f docker-compose-kvrocks.yml up -d
+ - name: Setup
+ shell: bash
+ run: |
+ cat << EOF >> $GITHUB_ENV
+ OPENDAL_REDIS_ENDPOINT=tcp://127.0.0.1:6379
+ OPENDAL_REDIS_ROOT=/
+ OPENDAL_REDIS_DB=0
+ EOF
diff --git a/.github/workflows/service_test_redis.yml b/.github/workflows/service_test_redis.yml
index fdc4f0fb2..5276f3ff9 100644
--- a/.github/workflows/service_test_redis.yml
+++ b/.github/workflows/service_test_redis.yml
@@ -101,49 +101,3 @@ jobs:
OPENDAL_REDIS_PASSWORD: opendal
OPENDAL_REDIS_ROOT: /test/opendal
OPENDAL_REDIS_DB: 0
-
- dragonfly:
- runs-on: ubuntu-latest
- services:
- redis:
- image: docker.dragonflydb.io/dragonflydb/dragonfly
- ports:
- - 6379:6379
- steps:
- - uses: actions/checkout@v4
- - name: Setup Rust toolchain
- uses: ./.github/actions/setup
- with:
- need-nextest: true
- - name: Test
- shell: bash
- working-directory: core
- run: cargo nextest run behavior --features services-redis
- env:
- OPENDAL_TEST: redis
- OPENDAL_REDIS_ENDPOINT: tcp://127.0.0.1:6379
- OPENDAL_REDIS_ROOT: /
- OPENDAL_REDIS_DB: 0
-
- kvrocks:
- runs-on: ubuntu-latest
- services:
- redis:
- image: apache/kvrocks:2.5.1
- ports:
- - 6379:6666
- steps:
- - uses: actions/checkout@v4
- - name: Setup Rust toolchain
- uses: ./.github/actions/setup
- with:
- need-nextest: true
- - name: Test
- shell: bash
- working-directory: core
- run: cargo nextest run behavior --features services-redis
- env:
- OPENDAL_TEST: redis
- OPENDAL_REDIS_ENDPOINT: tcp://127.0.0.1:6379
- OPENDAL_REDIS_ROOT: /
- OPENDAL_REDIS_DB: 0
diff --git a/fixtures/redis/docker-compose-dragonfly.yml b/fixtures/redis/docker-compose-dragonfly.yml
new file mode 100644
index 000000000..3eb22e34c
--- /dev/null
+++ b/fixtures/redis/docker-compose-dragonfly.yml
@@ -0,0 +1,24 @@
+# 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.
+
+version: '3.8'
+
+services:
+ redis:
+ image: docker.dragonflydb.io/dragonflydb/dragonfly
+ ports:
+ - '6379:6379'
diff --git a/fixtures/redis/docker-compose-kvrocks.yml b/fixtures/redis/docker-compose-kvrocks.yml
new file mode 100644
index 000000000..25e55a15f
--- /dev/null
+++ b/fixtures/redis/docker-compose-kvrocks.yml
@@ -0,0 +1,24 @@
+# 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.
+
+version: '3.8'
+
+services:
+ redis:
+ image: apache/kvrocks:2.5.1
+ ports:
+ - '6379:6666'