Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move all fixtures from core/src/services/{service} to top-level fixtures/{service} #3088

Merged
merged 9 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/service_test_etcd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ on:
- "!core/src/services/**"
- "core/src/services/etcd/**"
- ".github/workflows/service_test_etcd.yml"
- "fixtures/etcd/**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
Expand Down Expand Up @@ -145,10 +146,10 @@ jobs:

- name: Copy Etcd Certificate Files
shell: bash
working-directory: core
working-directory: fixtures
run: |
mkdir -p /tmp/etcd
cp -r `pwd`/src/services/etcd/fixtures/* /tmp/etcd
cp -r `pwd`/etcd/* /tmp/etcd

- name: Configure Etcd Service With TLS
# ETCD will use ports: 23790,23791,23792,23800,23801,23802
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/service_test_http.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ on:
- "!core/src/services/**"
- "core/src/services/http/**"
- ".github/workflows/service_test_http.yml"
- "fixtures/http/**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
Expand All @@ -48,7 +49,8 @@ jobs:
run: |
mkdir /tmp/static
cp -r tests/data/* /tmp/static
nginx -c `pwd`/src/services/http/fixtures/nginx.conf
cd ..
nginx -c `pwd`/fixtures/http/nginx.conf

- name: Setup Rust toolchain
uses: ./.github/actions/setup
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/service_test_postgresql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ on:
- "!core/src/services/**"
- "core/src/services/postgresql/**"
- ".github/workflows/service_test_postgresql.yml"
- "fixtures/postgresql/**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
Expand All @@ -44,8 +45,8 @@ jobs:
- uses: actions/checkout@v3
- name: Setup Postgresql Server
shell: bash
working-directory: core
run: docker-compose -f `pwd`/src/services/postgresql/fixtures/docker-compose.yml up -d
working-directory: fixtures/postgresql
run: docker-compose -f docker-compose.yml up -d

- name: Setup Rust toolchain
uses: ./.github/actions/setup
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/service_test_redis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ on:
- "!core/src/services/**"
- "core/src/services/redis/**"
- ".github/workflows/service_test_redis.yml"
- "fixtures/redis/**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
Expand All @@ -43,8 +44,8 @@ jobs:
- uses: actions/checkout@v3
- name: Setup Redis Server
shell: bash
working-directory: core
run: docker-compose -f `pwd`/src/services/redis/fixtures/docker-compose-redis.yml up -d
working-directory: fixtures/redis
run: docker-compose -f docker-compose-redis.yml up -d
- name: Setup Rust toolchain
uses: ./.github/actions/setup
with:
Expand All @@ -66,14 +67,14 @@ jobs:

- name: Setup Redis with TLS
shell: bash
working-directory: core
working-directory: fixtures/redis
run: |

# Install the CA in the system
sudo cp `pwd`/src/services/redis/fixtures/ssl/ca.crt /usr/local/share/ca-certificates
sudo cp ssl/ca.crt /usr/local/share/ca-certificates
sudo update-ca-certificates

docker-compose -f `pwd`/src/services/redis/fixtures/docker-compose-redis-tls.yml up -d
docker-compose -f docker-compose-redis-tls.yml up -d

- name: Setup Rust toolchain
uses: ./.github/actions/setup
Expand All @@ -100,8 +101,8 @@ jobs:
need-nextest: true
- name: Setup Redis Cluster
shell: bash
working-directory: core
run: docker-compose -f `pwd`/src/services/redis/fixtures/docker-compose-redis-cluster.yml up -d
working-directory: fixtures/redis
run: docker-compose -f docker-compose-redis-cluster.yml up -d
- name: Test
shell: bash
working-directory: core
Expand All @@ -120,15 +121,15 @@ jobs:

- name: Setup Redis Cluster with TLS
shell: bash
working-directory: core
working-directory: fixtures/redis
run: |

# Install the CA in the system

sudo cp `pwd`/src/services/redis/fixtures/ssl/ca.crt /usr/local/share/ca-certificates
sudo cp ssl/ca.crt /usr/local/share/ca-certificates
sudo update-ca-certificates

docker-compose -f `pwd`/src/services/redis/fixtures/docker-compose-redis-cluster-tls.yml up -d
docker-compose -f docker-compose-redis-cluster-tls.yml up -d

- name: Setup Rust toolchain
uses: ./.github/actions/setup
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/service_test_s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ on:
- "!core/src/services/**"
- "core/src/services/s3/**"
- ".github/workflows/service_test_s3.yml"
- "fixtures/s3/**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
Expand Down Expand Up @@ -113,7 +114,7 @@ jobs:
- uses: actions/checkout@v3
- name: Setup MinIO Server
shell: bash
working-directory: core/src/services/s3/fixtures
working-directory: fixtures/s3
run: docker-compose -f docker-compose-minio.yml up -d
- name: Setup test bucket
env:
Expand Down Expand Up @@ -143,7 +144,7 @@ jobs:
- uses: actions/checkout@v3
- name: Setup MinIO Server
shell: bash
working-directory: core/src/services/s3/fixtures
working-directory: fixtures/s3
run: |
docker-compose -f docker-compose-minio.yml up -d
- name: Setup test bucket
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/service_test_tikv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ on:
- "!core/src/services/**"
- "core/src/services/tikv/**"
- ".github/workflows/service_test_tikv.yml"
- "fixtures/tikv/**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
Expand All @@ -54,7 +55,7 @@ jobs:
[[ "$(curl -I http://127.0.0.1:2379/pd/api/v1/regions 2>/dev/null | head -n 1 | cut -d$' ' -f2)" -ne "405" ]] || break
sleep 1
done
working-directory: core/src/services/tikv/fixtures/
working-directory: fixtures/tikv

- name: Setup Rust toolchain
uses: ./.github/actions/setup
Expand All @@ -80,7 +81,7 @@ jobs:

- name: Copy Tikv Certificate Files
shell: bash
working-directory: core/src/services/tikv/fixtures/
working-directory: fixtures/tikv
run: |
mkdir -p /tmp/tikv/ssl
cp -r `pwd`/ssl/* /tmp/tikv/ssl
Expand Down Expand Up @@ -117,7 +118,7 @@ jobs:
[[ "$(curl -I --cacert /tmp/tikv/ssl/ca.pem --cert /tmp/tikv/ssl/client.pem --key /tmp/tikv/ssl/client-key.pem https://127.0.0.1:2379/pd/api/v1/regions 2>/dev/null | head -n 1 | cut -d$' ' -f2)" -ne "405" ]] || break
sleep 1
done
working-directory: core/src/services/tikv/fixtures/
working-directory: fixtures/tikv

- name: Setup Rust toolchain
uses: ./.github/actions/setup
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/service_test_webdav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ on:
- "!core/src/services/**"
- "core/src/services/webdav/**"
- ".github/workflows/service_test_webdav.yml"
- "fixtures/webdav/**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
Expand All @@ -48,7 +49,7 @@ jobs:

- name: Start nginx
shell: bash
working-directory: core/src/services/webdav/fixtures
working-directory: fixtures/webdav
run: docker compose -f docker-compose-webdav.yml up -d

- name: Test
Expand All @@ -70,7 +71,7 @@ jobs:

- name: Start nginx
shell: bash
working-directory: core/src/services/webdav/fixtures
working-directory: fixtures/webdav
run: docker compose -f docker-compose-webdav-with-auth.yml up -d

- name: Test with password
Expand All @@ -94,7 +95,7 @@ jobs:

- name: Start nginx
shell: bash
working-directory: core/src/services/webdav/fixtures
working-directory: fixtures/webdav
run: docker compose -f docker-compose-webdav-with-empty-passwd.yml up -d

- name: Test empty password
Expand All @@ -117,7 +118,7 @@ jobs:

- name: Start nginx
shell: bash
working-directory: core/src/services/webdav/fixtures
working-directory: fixtures/webdav
run: docker compose -f docker-compose-webdav.yml up -d

- name: Test with redirect
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.