Skip to content

Commit

Permalink
ci(services/redb): migrate to test planner (#3518)
Browse files Browse the repository at this point in the history
test(services/redb): migrate to test planner

Signed-off-by: suyanhanx <[email protected]>
  • Loading branch information
suyanhanx authored Nov 9, 2023
1 parent 5402670 commit 76fa7eb
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 111 deletions.
52 changes: 26 additions & 26 deletions .github/services/libsql/libsql-auth/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ name: libsql-auth
description: 'Behavior test for libsql auth'

runs:
using: "composite"
steps:
using: "composite"
steps:
- name: Setup libsql
shell: bash
working-directory: fixtures/libsql
Expand All @@ -29,30 +29,30 @@ runs:
shell: bash
working-directory: core
run: |
curl --location '127.0.0.1:8080/v2/pipeline' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJleHAiOjc5ODg0ODM4Mjd9.MatB2aLnPFusagqH2RMoVExP37o2GFLmaJbmd52OdLtAehRNeqeJZPrefP1t2GBFidApUTLlaBRL6poKq_s3CQ' \
--data '{
"baton": null,
"requests": [
{
"type": "execute",
"stmt": {
"sql": "CREATE TABLE IF NOT EXISTS `data` (`key` TEXT PRIMARY KEY NOT NULL CHECK(length(key) <= 255),`data` BLOB);",
"args": [],
"want_rows": true
}
}
]
}'
curl --location '127.0.0.1:8080/v2/pipeline' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJleHAiOjc5ODg0ODM4Mjd9.MatB2aLnPFusagqH2RMoVExP37o2GFLmaJbmd52OdLtAehRNeqeJZPrefP1t2GBFidApUTLlaBRL6poKq_s3CQ' \
--data '{
"baton": null,
"requests": [
{
"type": "execute",
"stmt": {
"sql": "CREATE TABLE IF NOT EXISTS `data` (`key` TEXT PRIMARY KEY NOT NULL CHECK(length(key) <= 255),`data` BLOB);",
"args": [],
"want_rows": true
}
}
]
}'
- name: Setup
shell: bash
run: |
cat << EOF >> $GITHUB_ENV
RUST_TEST_THREADS=1
OPENDAL_LIBSQL_CONNECTION_STRING=http://127.0.0.1:8080
OPENDAL_LIBSQL_AUTH_TOKEN=eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJleHAiOjc5ODg0ODM4Mjd9.MatB2aLnPFusagqH2RMoVExP37o2GFLmaJbmd52OdLtAehRNeqeJZPrefP1t2GBFidApUTLlaBRL6poKq_s3CQ
OPENDAL_LIBSQL_TABLE=data
OPENDAL_LIBSQL_KEY_FIELD=key
OPENDAL_LIBSQL_VALUE_FIELD=data
EOF
cat << EOF >> $GITHUB_ENV
RUST_TEST_THREADS=1
OPENDAL_LIBSQL_CONNECTION_STRING=http://127.0.0.1:8080
OPENDAL_LIBSQL_AUTH_TOKEN=eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJleHAiOjc5ODg0ODM4Mjd9.MatB2aLnPFusagqH2RMoVExP37o2GFLmaJbmd52OdLtAehRNeqeJZPrefP1t2GBFidApUTLlaBRL6poKq_s3CQ
OPENDAL_LIBSQL_TABLE=data
OPENDAL_LIBSQL_KEY_FIELD=key
OPENDAL_LIBSQL_VALUE_FIELD=data
EOF
48 changes: 24 additions & 24 deletions .github/services/libsql/libsql/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ name: libsql
description: 'Behavior test for libsql'

runs:
using: "composite"
steps:
using: "composite"
steps:
- name: Setup libsql
shell: bash
working-directory: fixtures/libsql
Expand All @@ -29,28 +29,28 @@ runs:
shell: bash
working-directory: core
run: |
curl --location '127.0.0.1:8080/v2/pipeline' \
--header 'Content-Type: application/json' \
--data '{
"baton": null,
"requests": [
{
"type": "execute",
"stmt": {
"sql": "CREATE TABLE IF NOT EXISTS `data` (`key` TEXT PRIMARY KEY NOT NULL CHECK(length(key) <= 255),`data` BLOB);",
"args": [],
"want_rows": true
}
}
]
}'
curl --location '127.0.0.1:8080/v2/pipeline' \
--header 'Content-Type: application/json' \
--data '{
"baton": null,
"requests": [
{
"type": "execute",
"stmt": {
"sql": "CREATE TABLE IF NOT EXISTS `data` (`key` TEXT PRIMARY KEY NOT NULL CHECK(length(key) <= 255),`data` BLOB);",
"args": [],
"want_rows": true
}
}
]
}'
- name: Setup
shell: bash
run: |
cat << EOF >> $GITHUB_ENV
RUST_TEST_THREADS=1
OPENDAL_LIBSQL_CONNECTION_STRING=http://127.0.0.1:8080
OPENDAL_LIBSQL_TABLE=data
OPENDAL_LIBSQL_KEY_FIELD=key
OPENDAL_LIBSQL_VALUE_FIELD=data
EOF
cat << EOF >> $GITHUB_ENV
RUST_TEST_THREADS=1
OPENDAL_LIBSQL_CONNECTION_STRING=http://127.0.0.1:8080
OPENDAL_LIBSQL_TABLE=data
OPENDAL_LIBSQL_KEY_FIELD=key
OPENDAL_LIBSQL_VALUE_FIELD=data
EOF
38 changes: 38 additions & 0 deletions .github/services/redb/redb/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 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: redb
description: 'Behavior test for redb'

runs:
using: "composite"
steps:
- name: Setup data dir
shell: bash
working-directory: core
run: mkdir -p $OPENDAL_REDB_DATADIR
env:
OPENDAL_REDB_DATADIR: /tmp/opendal/
- name: Setup
shell: bash
run: |
cat << EOF >> $GITHUB_ENV
RUST_TEST_THREADS=1
OPENDAL_REDB_ROOT=/
OPENDAL_REDB_DATADIR=/tmp/opendal/redb
OPENDAL_REDB_TABLE=redb-table
EOF
60 changes: 0 additions & 60 deletions .github/workflows/service_test_redb.yml

This file was deleted.

2 changes: 1 addition & 1 deletion fixtures/swift/docker-compose-swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ services:
test: ["CMD", "curl", "-i", "-H", "X-Storage-User: test:tester", "-H", "X-Storage-Pass: testing", "http://localhost:8080/"]
interval: 3s
timeout: 20s
retries: 10
retries: 10

0 comments on commit 76fa7eb

Please sign in to comment.