Skip to content

Commit 474d3a3

Browse files
authored
Merge pull request #498 from ovh/dev/aamstutz/parallellize-tests
chore: Parallellize acceptance tests
2 parents 13ea072 + 5167be0 commit 474d3a3

4 files changed

+743
-60
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
version: v1.0
2+
name: terraform-provider-ovh-post-sweepers
3+
parameters:
4+
testargs:
5+
type: string
6+
description: additional testargs
7+
8+
jobs:
9+
- job: checks
10+
steps:
11+
- name: Get the sources of the project
12+
checkout: '{{.cds.workspace}}'
13+
- name: Install terraform
14+
script: |
15+
#!/usr/bin/env bash
16+
set -eEuo pipefail
17+
echo "Installing terraform"
18+
tfurl="https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip"
19+
curl -sfLo - "${tfurl}" | gunzip -d - > /usr/local/bin/terraform
20+
chmod +x /usr/local/bin/terraform
21+
22+
- name: Run post sweepers
23+
script: |
24+
TF_ACC=1 go test ./ovh/ -v -sweep=1
25+
26+
requirements:
27+
- model: shared.infra/Go-official-1.20-bullseye
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
version: v1.0
2+
name: terraform-provider-ovh-pre-sweepers
3+
parameters:
4+
testargs:
5+
type: string
6+
description: additional testargs
7+
8+
jobs:
9+
- job: checks
10+
steps:
11+
- name: Get the sources of the project
12+
checkout: '{{.cds.workspace}}'
13+
- name: Install terraform
14+
script: |
15+
#!/usr/bin/env bash
16+
set -eEuo pipefail
17+
echo "Installing terraform"
18+
tfurl="https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip"
19+
curl -sfLo - "${tfurl}" | gunzip -d - > /usr/local/bin/terraform
20+
chmod +x /usr/local/bin/terraform
21+
22+
- name: Run pre sweepers
23+
script: |
24+
TF_ACC=1 go test ./ovh/ -v -sweep=1
25+
26+
requirements:
27+
- model: shared.infra/Go-official-1.20-bullseye

.cds/terraform-provider-ovh-testacc.pip.yml

-8
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,10 @@ jobs:
1919
curl -sfLo - "${tfurl}" | gunzip -d - > /usr/local/bin/terraform
2020
chmod +x /usr/local/bin/terraform
2121
22-
- name: Run pre sweepers
23-
script: |
24-
TF_ACC=1 go test ./ovh/ -v -sweep=1
25-
2622
- name: Run acceptance tests
2723
script: |
2824
#!/usr/bin/env bash
2925
make testacc TESTARGS="-parallel=1 ${CDS_PIP_TESTARGS}"
3026
31-
- name: Run post sweepers
32-
script: |
33-
TF_ACC=1 go test ./ovh/ -v -sweep=1
34-
3527
requirements:
3628
- model: shared.infra/Go-official-1.20-bullseye

0 commit comments

Comments
 (0)