Skip to content

Commit

Permalink
Merge pull request #38 from rw2/gtest-xrootd-system-test
Browse files Browse the repository at this point in the history
Gtest xrootd system test
  • Loading branch information
jhiemstrawisc authored Aug 13, 2024
2 parents f6accba + 35d7d4f commit 44abbfb
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Test

on:
workflow_dispatch:
branches:
- main
pull_request:
branches:
- main
Expand Down Expand Up @@ -28,7 +31,7 @@ jobs:
submodules: recursive
- name: install deps
run: |
sudo apt update && sudo apt-get install -y cmake libcurl4-openssl-dev libcurl4 pkg-config libssl-dev libxrootd-dev libxrootd-server-dev libgtest-dev
sudo apt update && sudo apt-get install -y cmake libcurl4-openssl-dev libcurl4 pkg-config libssl-dev xrootd-server libxrootd-dev libxrootd-server-dev libgtest-dev
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
Expand All @@ -51,9 +54,24 @@ jobs:
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE

- name: Test
- name: Unit Tests
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C $BUILD_TYPE --verbose

- name: Start xrootd
working-directory: ${{runner.workspace}}/build
shell: bash
run: xrootd -c ${{runner.workspace}}/xrootd-s3-http/test/s3-xrootd-test.cfg &

- name: Get a file
working-directory: ${{runner.workspace}}/build
shell: bash
run: curl -v http://localhost:8080/aws-opendata/2024/wod_apb_2024.nc -o wod_apb_2024.nc

- name: Get metadata
working-directory: ${{runner.workspace}}/build
shell: bash
run: curl -k -X PROPFIND http://localhost:8080/aws-opendata/2024/wod_apb_2024.nc -d prop_query
17 changes: 17 additions & 0 deletions test/s3-xrootd-test.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
all.export /
xrd.protocol http:8080 libXrdHttp.so
ofs.osslib /home/runner/work/xrootd-s3-http/build/libXrdS3.so
xrootd.async off
s3.begin
s3.path_name /aws-opendata
s3.bucket_name noaa-wod-pds
s3.service_name s3
s3.region us-east-1
s3.service_url https://s3.us-east-1.amazonaws.com
s3.end

s3.url_style virtual

ofs.trace all
xrd.trace all -sched
http.trace all

0 comments on commit 44abbfb

Please sign in to comment.