Skip to content

Commit

Permalink
Merge pull request #2329 from shiftstack/civ2_dns
Browse files Browse the repository at this point in the history
[CI-v2] Add dns job with Github Action
  • Loading branch information
EmilienM committed Jan 25, 2022
2 parents 0557ce8 + 02872a5 commit 86aa60d
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 20 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/functional-dns.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: functional-dns
on:
pull_request:
paths:
- '^acceptance/openstack/dns.*$'
- '.github/workflows/functional-dns.yaml'
schedule:
- cron: '0 0 * * *'
jobs:
functional-dns:
strategy:
fail-fast: false
matrix:
name: ["master"]
openstack_version: ["master"]
ubuntu_version: ["20.04"]
include:
- name: "xena"
openstack_version: "stable/xena"
ubuntu_version: "20.04"
- name: "wallaby"
openstack_version: "stable/wallaby"
ubuntu_version: "20.04"
- name: "victoria"
openstack_version: "stable/victoria"
ubuntu_version: "20.04"
- name: "ussuri"
openstack_version: "stable/ussuri"
ubuntu_version: "18.04"
- name: "train"
openstack_version: "stable/train"
ubuntu_version: "18.04"
runs-on: ubuntu-${{ matrix.ubuntu_version }}
name: Deploy OpenStack ${{ matrix.name }} with Designate and run dns acceptance tests
steps:
- name: Checkout Gophercloud
uses: actions/checkout@v2
- name: Deploy devstack
uses: EmilienM/devstack-action@v0.6
with:
branch: ${{ matrix.openstack_version }}
conf_overrides: |
enable_plugin designate https://opendev.org/openstack/designate ${{ matrix.openstack_version }}
enabled_services: 'designate,designate-central,designate-api,designate-worker,designate-producer,designate-mdns'
- name: Checkout go
uses: actions/setup-go@v2
with:
go-version: '^1.15'
- name: Run Gophercloud acceptance tests
run: ./script/acceptancetest
env:
DEVSTACK_PATH: ${{ github.workspace }}/devstack
ACCEPTANCE_TESTS_FILTER: "^acceptance/openstack/dns.*$"
- name: Generate logs on failure
run: ./script/collectlogs
if: failure()
- name: Upload logs artifacts on failure
if: failure()
uses: actions/upload-artifact@v2
with:
name: functional-dns-${{ matrix.name }}
path: /tmp/devstack-logs/*
8 changes: 0 additions & 8 deletions acceptance/clients/conditions.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ func RequirePortForwarding(t *testing.T) {
}
}

// RequireDNS will restrict a test to only be run in environments
// that support DNSaaS.
func RequireDNS(t *testing.T) {
if os.Getenv("OS_DNS_ENVIRONMENT") == "" {
t.Skip("this test requires DNSaaS")
}
}

// RequireGuestAgent will restrict a test to only be run in
// environments that support the QEMU guest agent.
func RequireGuestAgent(t *testing.T) {
Expand Down
4 changes: 0 additions & 4 deletions acceptance/openstack/dns/v2/recordsets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import (
)

func TestRecordSetsListByZone(t *testing.T) {
clients.RequireDNS(t)

client, err := clients.NewDNSV2Client()
th.AssertNoErr(t, err)

Expand Down Expand Up @@ -56,8 +54,6 @@ func TestRecordSetsListByZone(t *testing.T) {
}

func TestRecordSetsCRUD(t *testing.T) {
clients.RequireDNS(t)

client, err := clients.NewDNSV2Client()
th.AssertNoErr(t, err)

Expand Down
6 changes: 0 additions & 6 deletions acceptance/openstack/dns/v2/transfers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import (

func TestTransferRequestCRUD(t *testing.T) {
// Create new Zone
clients.RequireDNS(t)

client, err := clients.NewDNSV2Client()
th.AssertNoErr(t, err)

Expand Down Expand Up @@ -59,8 +57,6 @@ func TestTransferRequestCRUD(t *testing.T) {

func TestTransferRequestAccept(t *testing.T) {
// Create new project
clients.RequireAdmin(t)

identityClient, err := clients.NewIdentityV3Client()
th.AssertNoErr(t, err)

Expand All @@ -69,8 +65,6 @@ func TestTransferRequestAccept(t *testing.T) {
defer identity.DeleteProject(t, identityClient, project.ID)

// Create new Zone
clients.RequireDNS(t)

client, err := clients.NewDNSV2Client()
th.AssertNoErr(t, err)

Expand Down
2 changes: 0 additions & 2 deletions acceptance/openstack/dns/v2/zones_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import (
)

func TestZonesCRUD(t *testing.T) {
clients.RequireDNS(t)

client, err := clients.NewDNSV2Client()
th.AssertNoErr(t, err)

Expand Down

0 comments on commit 86aa60d

Please sign in to comment.