Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ensure obsolete tests are not run on 4.0
Browse files Browse the repository at this point in the history
Add support for masking out tests from 3.x that are not applicable to 4.0.
wallyworld committed Nov 25, 2024
1 parent 4e40ea9 commit 0998e8a
Showing 24 changed files with 1,199 additions and 118 deletions.
12 changes: 11 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
module github.com/juju/juju-qa-jenkins

go 1.20
go 1.23

toolchain go1.23.3

require (
github.com/schollz/progressbar/v3 v3.17.1
gopkg.in/yaml.v2 v2.3.0
mvdan.cc/sh/v3 v3.6.0
)

require (
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/rivo/uniseg v0.4.7 // indirect
golang.org/x/sys v0.27.0 // indirect
golang.org/x/term v0.26.0 // indirect
)
27 changes: 27 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,11 +1,38 @@
github.com/chengxilo/virtualterm v1.0.4 h1:Z6IpERbRVlfB8WkOmtbHiDbBANU7cimRIof7mk9/PwM=
github.com/chengxilo/virtualterm v1.0.4/go.mod h1:DyxxBZz/x1iqJjFxTFcr6/x+jSpqN0iwWCOK1q10rlY=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY=
github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ=
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/schollz/progressbar/v3 v3.17.1 h1:bI1MTaoQO+v5kzklBjYNRQLoVpe0zbyRZNK6DFkVC5U=
github.com/schollz/progressbar/v3 v3.17.1/go.mod h1:RzqpnsPQNjUyIgdglUjRLgD7sVnxN1wpmBMV+UiEbL4=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s=
golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU=
golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
mvdan.cc/sh/v3 v3.6.0 h1:gtva4EXJ0dFNvl5bHjcUEvws+KRcDslT8VKheTYkbGU=
mvdan.cc/sh/v3 v3.6.0/go.mod h1:U4mhtBLZ32iWhif5/lD+ygy1zrgaQhUu+XFy7C8+TTA=
12 changes: 12 additions & 0 deletions jobs/ci-run/integration/gen/test-actions.yml
Original file line number Diff line number Diff line change
@@ -107,6 +107,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -186,6 +189,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -265,6 +271,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -340,6 +349,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
48 changes: 48 additions & 0 deletions jobs/ci-run/integration/gen/test-authorized_keys.yml
Original file line number Diff line number Diff line change
@@ -131,6 +131,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -210,6 +213,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -289,6 +295,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -364,6 +373,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -443,6 +455,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -522,6 +537,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -601,6 +619,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -676,6 +697,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -755,6 +779,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -834,6 +861,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -913,6 +943,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -988,6 +1021,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -1067,6 +1103,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -1146,6 +1185,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -1225,6 +1267,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -1300,6 +1345,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
42 changes: 32 additions & 10 deletions jobs/ci-run/integration/gen/test-backup.yml
Original file line number Diff line number Diff line change
@@ -102,11 +102,22 @@
- select-oci-registry
- wait-for-cloud-init
- prepare-integration-test
- run-integration-test:
test_name: 'backup'
setup_steps: ''
task_name: ''
skip_tasks: ''
- conditional-step:
# Do not run on regexp version match.
# Accounts for tests which do not exist
# in later Juju versions.
- condition-kind: not
condition-operands:
- condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
on-evaluation-failure: "dont-run"
steps:
- run-integration-test:
test_name: 'backup'
setup_steps: ''
task_name: ''
skip_tasks: ''
publishers:
- integration-artifacts

@@ -171,10 +182,21 @@
- select-oci-registry
- wait-for-cloud-init
- prepare-integration-test
- run-integration-test:
test_name: 'backup'
setup_steps: ''
task_name: ''
skip_tasks: ''
- conditional-step:
# Do not run on regexp version match.
# Accounts for tests which do not exist
# in later Juju versions.
- condition-kind: not
condition-operands:
- condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
on-evaluation-failure: "dont-run"
steps:
- run-integration-test:
test_name: 'backup'
setup_steps: ''
task_name: ''
skip_tasks: ''
publishers:
- integration-artifacts
370 changes: 370 additions & 0 deletions jobs/ci-run/integration/gen/test-branches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,370 @@


# Code generated by gen-wire-tests. DO NOT EDIT.
- job:
name: 'test-branches-multijob'
project-type: 'multijob'
description: |-
Test branches Suite
condition: SUCCESSFUL
node: noop-parent-jobs
concurrent: true
wrappers:
- ansicolor
- workspace-cleanup
- timestamps
parameters:
- string:
default: ''
description: 'Enable sub job to be run individually.'
name: SHORT_GIT_COMMIT
- string:
default: ''
description: 'Build arch used to download the build tar.gz.'
name: BUILD_ARCH
- string:
default: ''
description: 'Ubuntu series to use when bootstrapping Juju'
name: BOOTSTRAP_SERIES
builders:
- get-build-details
- set-test-description
- multijob:
name: 'IntegrationTests-branches'
projects:
- name: 'test-branches-test-active-branch-output-aws'
current-parameters: true
- name: 'test-branches-test-active-branch-output-lxd'
current-parameters: true
- name: 'test-branches-test-branch-aws'
current-parameters: true
- name: 'test-branches-test-branch-lxd'
current-parameters: true

- job:
name: test-branches-test-active-branch-output-aws
node: ephemeral-noble-small-amd64
concurrent: true
description: |-
Test test_active_branch_output in branches suite on aws
parameters:
- validating-string:
name: SHORT_GIT_COMMIT
description: 'Enable sub job to be run individually.'
regex: ^\S{{7}}$
msg: Enter a valid 7 char git sha
- choice:
default: 'amd64'
description: 'Build arch used to download the build tar.gz.'
name: BUILD_ARCH
choices:
- amd64
- arm64
- s390x
- ppc64el
- choice:
default: ''
description: 'Arch used to boostrap controller.'
name: BOOTSTRAP_ARCH
choices:
- amd64
- arm64
- s390x
- ppc64el
- choice:
default: ''
description: 'Arch used for hosted models.'
name: MODEL_ARCH
choices:
- amd64
- arm64
- s390x
- ppc64el
- string:
default: 'aws'
description: 'Cloud to use when bootstrapping Juju'
name: BOOTSTRAP_CLOUD
- string:
default: 'ec2'
description: 'Provider to use when bootstrapping Juju'
name: BOOTSTRAP_PROVIDER
- string:
default: 'us-east-1'
description: 'Cloud Region to use when bootstrapping Juju'
name: BOOTSTRAP_REGION
- string:
default: ''
description: 'Ubuntu series to use when bootstrapping Juju'
name: BOOTSTRAP_SERIES
wrappers:
- default-integration-test-wrapper
- timeout:
timeout: 30
fail: true
type: absolute
builders:
- select-oci-registry
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Do not run on regexp version match.
# Accounts for tests which do not exist
# in later Juju versions.
- condition-kind: not
condition-operands:
- condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
on-evaluation-failure: "dont-run"
steps:
- run-integration-test:
test_name: 'branches'
setup_steps: ''
task_name: 'test_active_branch_output'
skip_tasks: 'test_branch'
publishers:
- integration-artifacts

- job:
name: test-branches-test-active-branch-output-lxd
node: ephemeral-noble-8c-32g-amd64
concurrent: true
description: |-
Test test_active_branch_output in branches suite on lxd
parameters:
- validating-string:
name: SHORT_GIT_COMMIT
description: 'Enable sub job to be run individually.'
regex: ^\S{{7}}$
msg: Enter a valid 7 char git sha
- choice:
default: 'amd64'
description: 'Build arch used to download the build tar.gz.'
name: BUILD_ARCH
choices:
- amd64
- arm64
- s390x
- ppc64el
- choice:
default: ''
description: 'Arch used to boostrap controller.'
name: BOOTSTRAP_ARCH
choices:
- amd64
- arm64
- s390x
- ppc64el
- choice:
default: ''
description: 'Arch used for hosted models.'
name: MODEL_ARCH
choices:
- amd64
- arm64
- s390x
- ppc64el
- string:
default: 'localhost'
description: 'Cloud to use when bootstrapping Juju'
name: BOOTSTRAP_CLOUD
- string:
default: 'lxd'
description: 'Provider to use when bootstrapping Juju'
name: BOOTSTRAP_PROVIDER
- string:
default: ''
description: 'Ubuntu series to use when bootstrapping Juju'
name: BOOTSTRAP_SERIES
wrappers:
- default-integration-test-wrapper
- timeout:
timeout: 30
fail: true
type: absolute
builders:
- select-oci-registry
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Do not run on regexp version match.
# Accounts for tests which do not exist
# in later Juju versions.
- condition-kind: not
condition-operands:
- condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
on-evaluation-failure: "dont-run"
steps:
- run-integration-test:
test_name: 'branches'
setup_steps: ''
task_name: 'test_active_branch_output'
skip_tasks: 'test_branch'
publishers:
- integration-artifacts

- job:
name: test-branches-test-branch-aws
node: ephemeral-noble-small-amd64
concurrent: true
description: |-
Test test_branch in branches suite on aws
parameters:
- validating-string:
name: SHORT_GIT_COMMIT
description: 'Enable sub job to be run individually.'
regex: ^\S{{7}}$
msg: Enter a valid 7 char git sha
- choice:
default: 'amd64'
description: 'Build arch used to download the build tar.gz.'
name: BUILD_ARCH
choices:
- amd64
- arm64
- s390x
- ppc64el
- choice:
default: ''
description: 'Arch used to boostrap controller.'
name: BOOTSTRAP_ARCH
choices:
- amd64
- arm64
- s390x
- ppc64el
- choice:
default: ''
description: 'Arch used for hosted models.'
name: MODEL_ARCH
choices:
- amd64
- arm64
- s390x
- ppc64el
- string:
default: 'aws'
description: 'Cloud to use when bootstrapping Juju'
name: BOOTSTRAP_CLOUD
- string:
default: 'ec2'
description: 'Provider to use when bootstrapping Juju'
name: BOOTSTRAP_PROVIDER
- string:
default: 'us-east-1'
description: 'Cloud Region to use when bootstrapping Juju'
name: BOOTSTRAP_REGION
- string:
default: ''
description: 'Ubuntu series to use when bootstrapping Juju'
name: BOOTSTRAP_SERIES
wrappers:
- default-integration-test-wrapper
- timeout:
timeout: 30
fail: true
type: absolute
builders:
- select-oci-registry
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Do not run on regexp version match.
# Accounts for tests which do not exist
# in later Juju versions.
- condition-kind: not
condition-operands:
- condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
on-evaluation-failure: "dont-run"
steps:
- run-integration-test:
test_name: 'branches'
setup_steps: ''
task_name: 'test_branch'
skip_tasks: 'test_active_branch_output'
publishers:
- integration-artifacts

- job:
name: test-branches-test-branch-lxd
node: ephemeral-noble-8c-32g-amd64
concurrent: true
description: |-
Test test_branch in branches suite on lxd
parameters:
- validating-string:
name: SHORT_GIT_COMMIT
description: 'Enable sub job to be run individually.'
regex: ^\S{{7}}$
msg: Enter a valid 7 char git sha
- choice:
default: 'amd64'
description: 'Build arch used to download the build tar.gz.'
name: BUILD_ARCH
choices:
- amd64
- arm64
- s390x
- ppc64el
- choice:
default: ''
description: 'Arch used to boostrap controller.'
name: BOOTSTRAP_ARCH
choices:
- amd64
- arm64
- s390x
- ppc64el
- choice:
default: ''
description: 'Arch used for hosted models.'
name: MODEL_ARCH
choices:
- amd64
- arm64
- s390x
- ppc64el
- string:
default: 'localhost'
description: 'Cloud to use when bootstrapping Juju'
name: BOOTSTRAP_CLOUD
- string:
default: 'lxd'
description: 'Provider to use when bootstrapping Juju'
name: BOOTSTRAP_PROVIDER
- string:
default: ''
description: 'Ubuntu series to use when bootstrapping Juju'
name: BOOTSTRAP_SERIES
wrappers:
- default-integration-test-wrapper
- timeout:
timeout: 30
fail: true
type: absolute
builders:
- select-oci-registry
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Do not run on regexp version match.
# Accounts for tests which do not exist
# in later Juju versions.
- condition-kind: not
condition-operands:
- condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
on-evaluation-failure: "dont-run"
steps:
- run-integration-test:
test_name: 'branches'
setup_steps: ''
task_name: 'test_branch'
skip_tasks: 'test_active_branch_output'
publishers:
- integration-artifacts
3 changes: 3 additions & 0 deletions jobs/ci-run/integration/gen/test-cloud_azure.yml
Original file line number Diff line number Diff line change
@@ -101,6 +101,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[4-9].*|^3\\.([6-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
6 changes: 6 additions & 0 deletions jobs/ci-run/integration/gen/test-controller.yml
Original file line number Diff line number Diff line change
@@ -541,6 +541,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[4-9].*|^3\\.([2-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -616,6 +619,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[4-9].*|^3\\.([2-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
6 changes: 6 additions & 0 deletions jobs/ci-run/integration/gen/test-controllercharm.yml
Original file line number Diff line number Diff line change
@@ -99,6 +99,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[4-9].*|^3\\.([3-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -174,6 +177,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[4-9].*|^3\\.([3-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
3 changes: 3 additions & 0 deletions jobs/ci-run/integration/gen/test-coslite.yml
Original file line number Diff line number Diff line change
@@ -97,6 +97,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[4-9].*|^3\\.([1-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
6 changes: 6 additions & 0 deletions jobs/ci-run/integration/gen/test-dashboard.yml
Original file line number Diff line number Diff line change
@@ -103,6 +103,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[4-9].*|^3\\.([1-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -178,6 +181,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[4-9].*|^3\\.([1-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
3 changes: 3 additions & 0 deletions jobs/ci-run/integration/gen/test-firewall.yml
Original file line number Diff line number Diff line change
@@ -251,6 +251,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[4-9].*|^3\\.([2-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
3 changes: 3 additions & 0 deletions jobs/ci-run/integration/gen/test-kubeflow.yml
Original file line number Diff line number Diff line change
@@ -97,6 +97,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[4-9].*|^3\\.([5-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
116 changes: 116 additions & 0 deletions jobs/ci-run/integration/gen/test-metrics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@


# Code generated by gen-wire-tests. DO NOT EDIT.
- job:
name: 'test-metrics-multijob'
project-type: 'multijob'
description: |-
Test metrics Suite
condition: SUCCESSFUL
node: noop-parent-jobs
concurrent: true
wrappers:
- ansicolor
- workspace-cleanup
- timestamps
parameters:
- string:
default: ''
description: 'Enable sub job to be run individually.'
name: SHORT_GIT_COMMIT
- string:
default: ''
description: 'Build arch used to download the build tar.gz.'
name: BUILD_ARCH
- string:
default: ''
description: 'Ubuntu series to use when bootstrapping Juju'
name: BOOTSTRAP_SERIES
builders:
- get-build-details
- set-test-description
- multijob:
name: 'IntegrationTests-metrics'
projects:
- name: 'test-metrics-test-smoke-test-lxd'
current-parameters: true

- job:
name: test-metrics-test-smoke-test-lxd
node: ephemeral-noble-8c-32g-amd64
concurrent: true
description: |-
Test metrics suite on lxd
parameters:
- validating-string:
name: SHORT_GIT_COMMIT
description: 'Enable sub job to be run individually.'
regex: ^\S{{7}}$
msg: Enter a valid 7 char git sha
- choice:
default: 'amd64'
description: 'Build arch used to download the build tar.gz.'
name: BUILD_ARCH
choices:
- amd64
- arm64
- s390x
- ppc64el
- choice:
default: ''
description: 'Arch used to boostrap controller.'
name: BOOTSTRAP_ARCH
choices:
- amd64
- arm64
- s390x
- ppc64el
- choice:
default: ''
description: 'Arch used for hosted models.'
name: MODEL_ARCH
choices:
- amd64
- arm64
- s390x
- ppc64el
- string:
default: 'localhost'
description: 'Cloud to use when bootstrapping Juju'
name: BOOTSTRAP_CLOUD
- string:
default: 'lxd'
description: 'Provider to use when bootstrapping Juju'
name: BOOTSTRAP_PROVIDER
- string:
default: ''
description: 'Ubuntu series to use when bootstrapping Juju'
name: BOOTSTRAP_SERIES
wrappers:
- default-integration-test-wrapper
- timeout:
timeout: 30
fail: true
type: absolute
builders:
- select-oci-registry
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Do not run on regexp version match.
# Accounts for tests which do not exist
# in later Juju versions.
- condition-kind: not
condition-operands:
- condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
on-evaluation-failure: "dont-run"
steps:
- run-integration-test:
test_name: 'metrics'
setup_steps: ''
task_name: ''
skip_tasks: ''
publishers:
- integration-artifacts
15 changes: 15 additions & 0 deletions jobs/ci-run/integration/gen/test-secrets_iaas.yml
Original file line number Diff line number Diff line change
@@ -105,6 +105,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[4-9].*|^3\\.([2-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -180,6 +183,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[4-9].*|^3\\.([1-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -255,6 +261,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[4-9].*|^3\\.([1-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -330,6 +339,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[4-9].*|^3\\.([1-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -405,6 +417,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[4-9].*|^3\\.([3-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
12 changes: 12 additions & 0 deletions jobs/ci-run/integration/gen/test-secrets_k8s.yml
Original file line number Diff line number Diff line change
@@ -103,6 +103,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[4-9].*|^3\\.([2-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -178,6 +181,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[4-9].*|^3\\.([1-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -253,6 +259,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[4-9].*|^3\\.([3-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -328,6 +337,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[4-9].*|^3\\.([3-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
9 changes: 9 additions & 0 deletions jobs/ci-run/integration/gen/test-sidecar.yml
Original file line number Diff line number Diff line change
@@ -243,6 +243,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[4-9].*|^3\\.([6-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -318,6 +321,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[4-9].*|^3\\.([4-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
@@ -393,6 +399,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[4-9].*|^3\\.([6-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
3 changes: 3 additions & 0 deletions jobs/ci-run/integration/gen/test-smoke_k8s.yml
Original file line number Diff line number Diff line change
@@ -97,6 +97,9 @@
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Only run on regexp version match.
# Accounts for tests which do not exist
# until a given Juju version.
condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
171 changes: 171 additions & 0 deletions jobs/ci-run/integration/gen/test-unit.yml
Original file line number Diff line number Diff line change
@@ -29,3 +29,174 @@
builders:
- get-build-details
- set-test-description
- multijob:
name: 'IntegrationTests-unit'
projects:
- name: 'test-unit-test-unit-series-aws'
current-parameters: true
- name: 'test-unit-test-unit-series-lxd'
current-parameters: true

- job:
name: test-unit-test-unit-series-aws
node: ephemeral-noble-small-amd64
concurrent: true
description: |-
Test unit suite on aws
parameters:
- validating-string:
name: SHORT_GIT_COMMIT
description: 'Enable sub job to be run individually.'
regex: ^\S{{7}}$
msg: Enter a valid 7 char git sha
- choice:
default: 'amd64'
description: 'Build arch used to download the build tar.gz.'
name: BUILD_ARCH
choices:
- amd64
- arm64
- s390x
- ppc64el
- choice:
default: ''
description: 'Arch used to boostrap controller.'
name: BOOTSTRAP_ARCH
choices:
- amd64
- arm64
- s390x
- ppc64el
- choice:
default: ''
description: 'Arch used for hosted models.'
name: MODEL_ARCH
choices:
- amd64
- arm64
- s390x
- ppc64el
- string:
default: 'aws'
description: 'Cloud to use when bootstrapping Juju'
name: BOOTSTRAP_CLOUD
- string:
default: 'ec2'
description: 'Provider to use when bootstrapping Juju'
name: BOOTSTRAP_PROVIDER
- string:
default: 'us-east-1'
description: 'Cloud Region to use when bootstrapping Juju'
name: BOOTSTRAP_REGION
- string:
default: ''
description: 'Ubuntu series to use when bootstrapping Juju'
name: BOOTSTRAP_SERIES
wrappers:
- default-integration-test-wrapper
- timeout:
timeout: 30
fail: true
type: absolute
builders:
- select-oci-registry
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Do not run on regexp version match.
# Accounts for tests which do not exist
# in later Juju versions.
- condition-kind: not
condition-operands:
- condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
on-evaluation-failure: "dont-run"
steps:
- run-integration-test:
test_name: 'unit'
setup_steps: ''
task_name: ''
skip_tasks: ''
publishers:
- integration-artifacts

- job:
name: test-unit-test-unit-series-lxd
node: ephemeral-noble-8c-32g-amd64
concurrent: true
description: |-
Test unit suite on lxd
parameters:
- validating-string:
name: SHORT_GIT_COMMIT
description: 'Enable sub job to be run individually.'
regex: ^\S{{7}}$
msg: Enter a valid 7 char git sha
- choice:
default: 'amd64'
description: 'Build arch used to download the build tar.gz.'
name: BUILD_ARCH
choices:
- amd64
- arm64
- s390x
- ppc64el
- choice:
default: ''
description: 'Arch used to boostrap controller.'
name: BOOTSTRAP_ARCH
choices:
- amd64
- arm64
- s390x
- ppc64el
- choice:
default: ''
description: 'Arch used for hosted models.'
name: MODEL_ARCH
choices:
- amd64
- arm64
- s390x
- ppc64el
- string:
default: 'localhost'
description: 'Cloud to use when bootstrapping Juju'
name: BOOTSTRAP_CLOUD
- string:
default: 'lxd'
description: 'Provider to use when bootstrapping Juju'
name: BOOTSTRAP_PROVIDER
- string:
default: ''
description: 'Ubuntu series to use when bootstrapping Juju'
name: BOOTSTRAP_SERIES
wrappers:
- default-integration-test-wrapper
- timeout:
timeout: 30
fail: true
type: absolute
builders:
- select-oci-registry
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Do not run on regexp version match.
# Accounts for tests which do not exist
# in later Juju versions.
- condition-kind: not
condition-operands:
- condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
on-evaluation-failure: "dont-run"
steps:
- run-integration-test:
test_name: 'unit'
setup_steps: ''
task_name: ''
skip_tasks: ''
publishers:
- integration-artifacts
85 changes: 85 additions & 0 deletions jobs/ci-run/integration/gen/test-upgrade_series.yml
Original file line number Diff line number Diff line change
@@ -29,3 +29,88 @@
builders:
- get-build-details
- set-test-description
- multijob:
name: 'IntegrationTests-upgrade_series'
projects:
- name: 'test-upgrade_series-test-upgrade-series-relation-lxd'
current-parameters: true

- job:
name: test-upgrade_series-test-upgrade-series-relation-lxd
node: ephemeral-noble-8c-32g-amd64
concurrent: true
description: |-
Test upgrade_series suite on lxd
parameters:
- validating-string:
name: SHORT_GIT_COMMIT
description: 'Enable sub job to be run individually.'
regex: ^\S{{7}}$
msg: Enter a valid 7 char git sha
- choice:
default: 'amd64'
description: 'Build arch used to download the build tar.gz.'
name: BUILD_ARCH
choices:
- amd64
- arm64
- s390x
- ppc64el
- choice:
default: ''
description: 'Arch used to boostrap controller.'
name: BOOTSTRAP_ARCH
choices:
- amd64
- arm64
- s390x
- ppc64el
- choice:
default: ''
description: 'Arch used for hosted models.'
name: MODEL_ARCH
choices:
- amd64
- arm64
- s390x
- ppc64el
- string:
default: 'localhost'
description: 'Cloud to use when bootstrapping Juju'
name: BOOTSTRAP_CLOUD
- string:
default: 'lxd'
description: 'Provider to use when bootstrapping Juju'
name: BOOTSTRAP_PROVIDER
- string:
default: ''
description: 'Ubuntu series to use when bootstrapping Juju'
name: BOOTSTRAP_SERIES
wrappers:
- default-integration-test-wrapper
- timeout:
timeout: 30
fail: true
type: absolute
builders:
- select-oci-registry
- wait-for-cloud-init
- prepare-integration-test
- conditional-step:
# Do not run on regexp version match.
# Accounts for tests which do not exist
# in later Juju versions.
- condition-kind: not
condition-operands:
- condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{{2,}})(\\.|-).*"
label: "${{JUJU_VERSION}}"
on-evaluation-failure: "dont-run"
steps:
- run-integration-test:
test_name: 'upgrade_series'
setup_steps: ''
task_name: ''
skip_tasks: ''
publishers:
- integration-artifacts
4 changes: 4 additions & 0 deletions jobs/ci-run/integration/integrationtests.yml
Original file line number Diff line number Diff line change
@@ -138,6 +138,10 @@
current-parameters: true
predefined-parameters: |-
BUILD_ARCH=amd64
- name: 'test-metrics-multijob'
current-parameters: true
predefined-parameters: |-
BUILD_ARCH=amd64
- name: 'test-model-multijob'
current-parameters: true
predefined-parameters: |-
17 changes: 9 additions & 8 deletions tools/gen-wire-tests/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# gen-wire-tests

The `gen-wire-tests` Go tool is used to generate the Jenkins integration tests
in `jobs/ci-run/integration/gen`. It requires two arguments:
- The path to the Juju `tests/suites` directory
in `jobs/ci-run/integration/gen`. It requires one argument:
- The directory where the resulting yaml files will be written

You also need to provide a configuration file (usually `juju.config`) via stdin.

The tool reads the test suites from the Juju repo on github. To avoid API rate
limiting for unauthenticated requests, create an access token and set the env
var GH_TOKEN before running the tool. This is optional but recommended.

We suggest running it as follows:

```bash
@@ -18,20 +21,18 @@ To run by hand, or the hard way:

```bash
cd tools/gen-wire-tests
cat juju.config | go run main.go <jujuroot>/tests/suites \
../../jobs/ci-run/integration/gen <version of juju>
cat juju.config | go run main.go \
../../jobs/ci-run/integration/gen
```

or

```bash
cd tools/gen-wire-tests
go build main.go
cat juju.config | ./main <jujuroot>/tests/suites \
../../jobs/ci-run/integration/gen <version of juju>
cat juju.config | ./main \
../../jobs/ci-run/integration/gen
```

where `<jujuroot>` is the path to the Juju source tree on your local machine.

If you are adding new test suites, you will also need to add a new job to
`jobs/ci-run/integration/integrationtests.yml`.
9 changes: 8 additions & 1 deletion tools/gen-wire-tests/juju.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
folders:
removed:
deploy-test_deploy_os:
4.0
introduced:
cloud_azure-test_managed_identity:
3.6
@@ -36,7 +39,7 @@ folders:
3.6
test_rootless:
3.6
authorized_keys-*:
authorized_keys:
4.0
test_actions_params:
4.0
@@ -100,6 +103,7 @@ folders:
- secrets_k8s
- smoke_k8s
- kubeflow
- metrics
skip-google:
- agents
- appdata
@@ -141,6 +145,7 @@ folders:
- model_multi
- kubeflow
- model_multi
- metrics
skip-azure:
- agents
- appdata
@@ -181,6 +186,7 @@ folders:
- secrets_k8s
- kubeflow
- model_multi
- metrics
skip-microk8s:
- actions
- agents
@@ -218,6 +224,7 @@ folders:
- user
- secrets_iaas
- model_multi
- metrics
skip-subtasks:
- test_pebble_change_updated
- test_upgrade_simplestream_previous
335 changes: 237 additions & 98 deletions tools/gen-wire-tests/main.go

Large diffs are not rendered by default.

0 comments on commit 0998e8a

Please sign in to comment.