Skip to content

Commit

Permalink
CI: Switch to Makefile for running acceptance tests
Browse files Browse the repository at this point in the history
We can remove the 'acceptancetest' script in the process. Note that this
isn't a 1:1 match: the fwaasv2 test job now runs the entire networking
test suite and not just the fwaasv2-specific tests but seeing as this is
using OVS rather than OVN that doesn't seem like such a bad thing.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
  • Loading branch information
stephenfin committed May 22, 2024
1 parent 10043e6 commit e1ed5a3
Show file tree
Hide file tree
Showing 20 changed files with 60 additions and 79 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/functional-baremetal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,11 @@ jobs:
with:
go-version: '^1.20'
- name: Run Gophercloud acceptance tests
run: ./script/acceptancetest
run: |
source ${{ github.workspace }}/script/stackenv
make acceptance-baremetal
env:
DEVSTACK_PATH: ${{ github.workspace }}/devstack
ACCEPTANCE_TESTS_FILTER: '^.*baremetal(.(?!noauth).*)?$'
OS_BRANCH: ${{ matrix.openstack_version }}
# TODO(dtantsur): default to "all" when no longer supporting versions before 2024.1
OS_SYSTEM_SCOPE: ${{ matrix.os_system_scope }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/functional-basic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ jobs:
with:
go-version: '^1.20'
- name: Run Gophercloud acceptance tests
run: ./script/acceptancetest
run: |
source ${{ github.workspace }}/script/stackenv
make acceptance-basic
env:
DEVSTACK_PATH: ${{ github.workspace }}/devstack
ACCEPTANCE_TESTS_FILTER: '^internal/acceptance/openstack$'
OS_BRANCH: ${{ matrix.openstack_version }}
- name: Generate logs on failure
run: ./script/collectlogs
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/functional-blockstorage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ jobs:
with:
go-version: '^1.20'
- name: Run Gophercloud acceptance tests
run: ./script/acceptancetest
run: |
source ${{ github.workspace }}/script/stackenv
make acceptance-blockstorage
env:
DEVSTACK_PATH: ${{ github.workspace }}/devstack
ACCEPTANCE_TESTS_FILTER: ^.*blockstorage(.(?!noauth).*)?$
OS_BRANCH: ${{ matrix.openstack_version }}
- name: Generate logs on failure
run: ./script/collectlogs
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/functional-compute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ jobs:
with:
go-version: '^1.20'
- name: Run Gophercloud acceptance tests
run: ./script/acceptancetest
run: |
source ${{ github.workspace }}/script/stackenv
make acceptance-compute
env:
DEVSTACK_PATH: ${{ github.workspace }}/devstack
ACCEPTANCE_TESTS_FILTER: "^.*compute.*$"
OS_BRANCH: ${{ matrix.openstack_version }}
- name: Generate logs on failure
run: ./script/collectlogs
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/functional-containerinfra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ jobs:
with:
go-version: '^1.20'
- name: Run Gophercloud acceptance tests
run: ./script/acceptancetest
run: |
source ${{ github.workspace }}/script/stackenv
make acceptance-containerinfra
env:
DEVSTACK_PATH: ${{ github.workspace }}/devstack
ACCEPTANCE_TESTS_FILTER: "^.*containerinfra.*$"
OS_BRANCH: ${{ matrix.openstack_version }}
- name: Generate logs on failure
run: ./script/collectlogs
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/functional-dns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ jobs:
with:
go-version: '^1.20'
- name: Run Gophercloud acceptance tests
run: ./script/acceptancetest
run: |
source ${{ github.workspace }}/script/stackenv
make acceptance-dns
env:
DEVSTACK_PATH: ${{ github.workspace }}/devstack
ACCEPTANCE_TESTS_FILTER: "^acceptance/openstack/dns.*$"
OS_BRANCH: ${{ matrix.openstack_version }}
- name: Generate logs on failure
run: ./script/collectlogs
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/functional-fwaas_v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ jobs:
with:
go-version: '^1.20'
- name: Run Gophercloud acceptance tests
run: ./script/acceptancetest
run: |
source ${{ github.workspace }}/script/stackenv
make acceptance-networking
env:
DEVSTACK_PATH: ${{ github.workspace }}/devstack
ACCEPTANCE_TESTS_FILTER: "^.*fwaas_v2.*$"
OS_BRANCH: ${{ matrix.openstack_version }}
- name: Generate logs on failure
run: ./script/collectlogs
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/functional-identity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ jobs:
with:
go-version: '^1.20'
- name: Run Gophercloud acceptance tests
run: ./script/acceptancetest
run: |
source ${{ github.workspace }}/script/stackenv
make acceptance-identity
env:
DEVSTACK_PATH: ${{ github.workspace }}/devstack
ACCEPTANCE_TESTS_FILTER: "^.*identity.*$"
OS_BRANCH: ${{ matrix.openstack_version }}
- name: Generate logs on failure
run: ./script/collectlogs
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/functional-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ jobs:
with:
go-version: '^1.20'
- name: Run Gophercloud acceptance tests
run: ./script/acceptancetest
run: |
source ${{ github.workspace }}/script/stackenv
make acceptance-image
env:
DEVSTACK_PATH: ${{ github.workspace }}/devstack
ACCEPTANCE_TESTS_FILTER: "^.*image.*$"
OS_BRANCH: ${{ matrix.openstack_version }}
- name: Generate logs on failure
run: ./script/collectlogs
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/functional-keymanager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ jobs:
with:
go-version: '^1.20'
- name: Run Gophercloud acceptance tests
run: ./script/acceptancetest
run: |
source ${{ github.workspace }}/script/stackenv
make acceptance-keymanager
env:
DEVSTACK_PATH: ${{ github.workspace }}/devstack
ACCEPTANCE_TESTS_FILTER: "^.*keymanager.*$"
OS_BRANCH: ${{ matrix.openstack_version }}
- name: Generate logs on failure
run: ./script/collectlogs
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/functional-loadbalancer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ jobs:
with:
go-version: '^1.20'
- name: Run Gophercloud acceptance tests
run: ./script/acceptancetest
run: |
source ${{ github.workspace }}/script/stackenv
make acceptance-loadbalancer
env:
DEVSTACK_PATH: ${{ github.workspace }}/devstack
ACCEPTANCE_TESTS_FILTER: "^.*loadbalancer.*$"
OS_BRANCH: ${{ matrix.openstack_version }}
- name: Generate logs on failure
run: ./script/collectlogs
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/functional-messaging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ jobs:
with:
go-version: '^1.20'
- name: Run Gophercloud acceptance tests
run: ./script/acceptancetest
run: |
source ${{ github.workspace }}/script/stackenv
make acceptance-messaging
env:
DEVSTACK_PATH: ${{ github.workspace }}/devstack
ACCEPTANCE_TESTS_FILTER: "^.*messaging.*$"
OS_BRANCH: ${{ matrix.openstack_version }}
- name: Generate logs on failure
run: ./script/collectlogs
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/functional-networking.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,11 @@ jobs:
with:
go-version: '^1.20'
- name: Run Gophercloud acceptance tests
run: ./script/acceptancetest
run: |
source ${{ github.workspace }}/script/stackenv
make acceptance-networking
env:
DEVSTACK_PATH: ${{ github.workspace }}/devstack
ACCEPTANCE_TESTS_FILTER: "^(?!.*fwaas_v2.*).*networking.*$"
OS_BRANCH: ${{ matrix.openstack_version }}
- name: Generate logs on failure
run: ./script/collectlogs
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/functional-objectstorage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ jobs:
with:
go-version: '^1.20'
- name: Run Gophercloud acceptance tests
run: ./script/acceptancetest
run: |
source ${{ github.workspace }}/script/stackenv
make acceptance-objectstorage
env:
DEVSTACK_PATH: ${{ github.workspace }}/devstack
ACCEPTANCE_TESTS_FILTER: '^.*objectstorage.*$'
OS_BRANCH: ${{ matrix.openstack_version }}
- name: Generate logs on failure
run: ./script/collectlogs
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/functional-orchestration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ jobs:
with:
go-version: '^1.20'
- name: Run Gophercloud acceptance tests
run: ./script/acceptancetest
run: |
source ${{ github.workspace }}/script/stackenv
make acceptance-orchestration
env:
DEVSTACK_PATH: ${{ github.workspace }}/devstack
ACCEPTANCE_TESTS_FILTER: ^.*orchestration.*$
OS_BRANCH: ${{ matrix.openstack_version }}
- name: Generate logs on failure
run: ./script/collectlogs
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/functional-placement.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ jobs:
with:
go-version: '^1.20'
- name: Run Gophercloud acceptance tests
run: ./script/acceptancetest
run: |
source ${{ github.workspace }}/script/stackenv
make acceptance-placement
env:
DEVSTACK_PATH: ${{ github.workspace }}/devstack
ACCEPTANCE_TESTS_FILTER: ^.*placement.*$
OS_BRANCH: ${{ matrix.openstack_version }}
- name: Generate logs on failure
run: ./script/collectlogs
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/functional-sharedfilesystems.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,11 @@ jobs:
with:
go-version: '^1.20'
- name: Run Gophercloud acceptance tests
run: ./script/acceptancetest
run: |
source ${{ github.workspace }}/script/stackenv
make acceptance-sharedfilesystems
env:
DEVSTACK_PATH: ${{ github.workspace }}/devstack
ACCEPTANCE_TESTS_FILTER: "^.*sharedfilesystems.*$"
OS_BRANCH: ${{ matrix.openstack_version }}
- name: Generate logs on failure
run: ./script/collectlogs
Expand Down
8 changes: 7 additions & 1 deletion internal/acceptance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,13 @@ to set them manually.
From the root directory, run:

```
./script/acceptancetest
make acceptance
```

You can also run tests for a specific service:

```
make acceptance-compute
```

Alternatively, add the following to your `.bashrc`:
Expand Down
42 changes: 0 additions & 42 deletions script/acceptancetest

This file was deleted.

4 changes: 2 additions & 2 deletions script/stackenv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Prep the testing environment by creating the required testing resources and
# environment variables. This env is for theopenlab CI jobs, you might need
# to modify this according to your setup
# environment variables. This env is for CI jobs so you might need to modify
# this according to your setup

DEVSTACK_PATH=${DEVSTACK_PATH:-/opt/stack/new/devstack}
pushd $DEVSTACK_PATH
Expand Down

0 comments on commit e1ed5a3

Please sign in to comment.