Skip to content

Commit f45bdd1

Browse files
authored
Merge pull request #132 from Mytherin/addextensions
Move over httpfs tests from main repo to duckdb-httpfs + add CI run
2 parents 1f137f7 + 98848a6 commit f45bdd1

File tree

122 files changed

+7533
-69
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+7533
-69
lines changed
Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Minio Tests
1+
name: Integration Tests
22
on: [push, pull_request,repository_dispatch]
33
concurrency:
44
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }}
@@ -8,17 +8,19 @@ defaults:
88
shell: bash
99

1010
jobs:
11-
minio-tests:
12-
name: Minio Tests
13-
runs-on: ubuntu-24.04
11+
linux-tests-httpfs:
12+
name: MinIO Tests
13+
runs-on: ubuntu-latest
1414
env:
1515
S3_TEST_SERVER_AVAILABLE: 1
1616
AWS_DEFAULT_REGION: eu-west-1
1717
AWS_ACCESS_KEY_ID: minio_duckdb_user
1818
AWS_SECRET_ACCESS_KEY: minio_duckdb_user_password
1919
DUCKDB_S3_ENDPOINT: duckdb-minio.com:9000
2020
DUCKDB_S3_USE_SSL: false
21-
CORE_EXTENSIONS: 'parquet;json'
21+
HTTP_PROXY_PUBLIC: localhost:3128
22+
TEST_PERSISTENT_SECRETS_AVAILABLE: true
23+
CORE_EXTENSIONS: "parquet;json;tpch"
2224
GEN: ninja
2325
VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
2426
VCPKG_TARGET_TRIPLET: x64-linux
@@ -43,37 +45,44 @@ jobs:
4345
uses: hendrikmuhs/ccache-action@main
4446
with:
4547
key: ${{ github.job }}
46-
save: ${{ github.ref == 'refs/heads/main' || github.repository != 'duckdb/duckdb' }}
48+
save: ${{ github.ref == 'refs/heads/main' || github.repository != 'duckdb/duckdb-httpfs' }}
4749

4850
- name: Setup vcpkg
4951
uses: lukka/[email protected]
5052
with:
5153
vcpkgGitCommitId: 5e5d0e1cd7785623065e77eff011afdeec1a3574
5254

53-
- name: Build
55+
- name: Fix permissions of test secrets
5456
shell: bash
55-
run: |
56-
echo -e "\nduckdb_extension_load(tpch)\n" >> extension_config.cmake
57-
make
57+
run: chmod -R 700 data/secrets
5858

59-
- name: Start S3/HTTP test server
59+
# TODO: fix the authenticated proxy here
60+
- name: Install and run http proxy squid
6061
shell: bash
6162
run: |
62-
cd duckdb
63-
mkdir data/attach_test
64-
touch data/attach_test/attach.db
65-
sudo ./scripts/install_s3_test_server.sh
66-
source ./scripts/run_s3_test_server.sh
67-
sleep 30
63+
sudo apt-get install squid
64+
./scripts/run_squid.sh --port 3128 --log_dir squid_logs &
6865
69-
- name: Run & Populate test server
66+
- name: Run & Populate Python test server
7067
shell: bash
7168
run: |
7269
mkdir -p $PYTHON_HTTP_SERVER_DIR
7370
cd $PYTHON_HTTP_SERVER_DIR
7471
python3 -m http.server 8008 &
7572
76-
- name: Test
73+
- name: Build
74+
shell: bash
75+
run: make
76+
77+
- name: Install test server
78+
shell: bash
79+
run: |
80+
sudo ./scripts/install_s3_test_server.sh
81+
./scripts/generate_presigned_url.sh
82+
83+
- name: Start test server & run tests
7784
shell: bash
7885
run: |
79-
make test
86+
source ./scripts/run_s3_test_server.sh
87+
source ./scripts/set_s3_test_server_variables.sh
88+
make test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,3 +355,4 @@ extension_external
355355

356356
test/sql/pragma/output.json
357357
tools/pythonpkg/duckdb_build/
358+
test/test_data

Makefile

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,5 @@ PROJ_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
44
EXT_NAME=httpfs
55
EXT_CONFIG=${PROJ_DIR}extension_config.cmake
66

7-
CORE_EXTENSIONS=''
8-
97
# Include the Makefile from extension-ci-tools
108
include extension-ci-tools/makefiles/duckdb_extension.Makefile
11-
12-
13-
## Add some more extra tests
14-
test_release_internal:
15-
./build/release/$(TEST_PATH) "$(PROJ_DIR)test/*"
16-
./build/release/$(TEST_PATH) --test-dir duckdb --test-config test/configs/duckdb-tests.json
17-
18-
test_debug_internal:
19-
./build/debug/$(TEST_PATH) "$(PROJ_DIR)test/*"
20-
./build/debug/$(TEST_PATH) --test-dir duckdb --test-config test/configs/duckdb-tests.json
21-
22-
test_reldebug_internal:
23-
./build/reldebug/$(TEST_PATH) "$(PROJ_DIR)test/*"
24-
./build/reldebug/$(TEST_PATH) --test-dir duckdb --test-config test/configs/duckdb-tests.json

data/secrets/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Test secrets
2+
DuckDB only allows persistent secrets with the x00 permission (e.g. 600 or 700). Therefore to use these
3+
secrets, the permissions need to be set before running any tests that uses them.
4+
5+
The recommended way to add tests that touch these persistent secret files is to put them behind a
6+
```shell
7+
require-env TEST_PERSISTENT_SECRETS_AVAILABLE
8+
```
9+
statement, which ensures the tests only run in CI jobs where the permissions are set correctly.
10+
435 Bytes
Binary file not shown.
435 Bytes
Binary file not shown.
1.05 KB
Binary file not shown.
561 Bytes
Binary file not shown.
561 Bytes
Binary file not shown.
561 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)