-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request juju#18151 from barrettj12/pack-testcharms
juju#18151 Deploying a charm from an unpacked directory is no longer supported in 4.0. Hence, when using local charms in testing, we need to pack them first inside the test. - I added a test utility function `pack_charm` which uses Charmcraft to pack the charm at the given path, and returns a glob that can be provided to `juju deploy` to deploy the packed charm. - I have added/updated the `charmcraft.yaml` in several testing charms to be compatible with the new [Charmcraft changes in 3.0](https://discourse.charmhub.io/t/charmcraft-3-0-in-the-beta-channel/13469). - I have added `charmcraft` to the checked dependencies for those tests which require charms to be packed. ## Checklist <!-- If an item is not applicable, use `~strikethrough~`. --> - [x] Code style: imports ordered, good names, simple structure, etc - [x] Comments saying why design decisions were made - ~[ ] Go unit tests, with comments saying what you're testing~ - [x] [Integration tests](https://github.com/juju/juju/tree/main/tests), with comments saying what you're testing - ~[ ] [doc.go](https://discourse.charmhub.io/t/readme-in-packages/451) added or updated in changed packages~ ## QA steps <!-- Describe steps to verify that the change works. --> Run the following test suites: deploy, hooks, relations, sidecar, spaces_ec2, storage. Many of these tests will not pass due to other issues, but at least we should not see the following error: ``` ERROR attempting to deploy "....": deploying from directory not supported ``` ## Links **Jira card:** JUJU-6825
- Loading branch information
Showing
35 changed files
with
289 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
# Learn more about charmcraft.yaml configuration at: | ||
# https://juju.is/docs/sdk/charmcraft-config | ||
type: "charm" | ||
bases: | ||
- build-on: | ||
- name: "ubuntu" | ||
channel: "22.04" | ||
run-on: | ||
- name: "ubuntu" | ||
channel: "22.04" | ||
base: [email protected] | ||
platforms: | ||
amd64: | ||
arm64: | ||
s390x: | ||
parts: | ||
# Include extra files in the packed charm | ||
include: | ||
plugin: dump | ||
source: . | ||
prime: | ||
- hooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,12 @@ | ||
type: "charm" | ||
bases: | ||
- build-on: | ||
- name: "ubuntu" | ||
channel: "20.04" | ||
architectures: ["amd64", "arm64"] | ||
run-on: | ||
- name: "ubuntu" | ||
channel: "16.04" | ||
architectures: | ||
- amd64 | ||
- aarch64 | ||
- arm64 | ||
- s390x | ||
- name: "ubuntu" | ||
channel: "18.04" | ||
architectures: | ||
- amd64 | ||
- aarch64 | ||
- arm64 | ||
- s390x | ||
- name: "ubuntu" | ||
channel: "20.04" | ||
architectures: | ||
- amd64 | ||
- aarch64 | ||
- arm64 | ||
- s390x | ||
- name: "ubuntu" | ||
channel: "22.04" | ||
architectures: | ||
- amd64 | ||
- aarch64 | ||
- arm64 | ||
- s390x | ||
base: [email protected] | ||
platforms: | ||
amd64: | ||
arm64: | ||
s390x: | ||
parts: | ||
tiny-bash: | ||
# Include extra files in the packed charm | ||
include: | ||
plugin: dump | ||
source: . | ||
prime: | ||
|
@@ -45,3 +17,4 @@ parts: | |
- copyright | ||
- hooks | ||
- metadata.yaml | ||
- scripts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,12 @@ | ||
type: "charm" | ||
bases: | ||
- build-on: | ||
- name: "ubuntu" | ||
channel: "20.04" | ||
architectures: ["amd64", "arm64"] | ||
run-on: | ||
- name: "ubuntu" | ||
channel: "16.04" | ||
architectures: | ||
- amd64 | ||
- aarch64 | ||
- arm64 | ||
- s390x | ||
- name: "ubuntu" | ||
channel: "18.04" | ||
architectures: | ||
- amd64 | ||
- aarch64 | ||
- arm64 | ||
- s390x | ||
- name: "ubuntu" | ||
channel: "20.04" | ||
architectures: | ||
- amd64 | ||
- aarch64 | ||
- arm64 | ||
- s390x | ||
- name: "ubuntu" | ||
channel: "22.04" | ||
architectures: | ||
- amd64 | ||
- aarch64 | ||
- arm64 | ||
- s390x | ||
base: [email protected] | ||
platforms: | ||
amd64: | ||
arm64: | ||
s390x: | ||
parts: | ||
tiny-bash: | ||
# Include extra files in the packed charm | ||
include: | ||
plugin: dump | ||
source: . | ||
prime: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
type: "charm" | ||
base: [email protected] | ||
platforms: | ||
amd64: | ||
arm64: | ||
s390x: | ||
parts: | ||
# Include extra files in the packed charm | ||
include: | ||
plugin: dump | ||
source: . | ||
prime: | ||
- hooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
type: "charm" | ||
base: [email protected] | ||
platforms: | ||
amd64: | ||
arm64: | ||
s390x: | ||
parts: | ||
# Include extra files in the packed charm | ||
include: | ||
plugin: dump | ||
source: . | ||
prime: | ||
- hooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
type: "charm" | ||
base: [email protected] | ||
platforms: | ||
amd64: | ||
arm64: | ||
s390x: | ||
parts: | ||
# Include extra files in the packed charm | ||
include: | ||
plugin: dump | ||
source: . | ||
prime: | ||
- hooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
type: "charm" | ||
base: [email protected] | ||
platforms: | ||
amd64: | ||
arm64: | ||
s390x: | ||
parts: | ||
# Include extra files in the packed charm | ||
include: | ||
plugin: dump | ||
source: . | ||
prime: | ||
- hooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
type: "charm" | ||
base: [email protected] | ||
platforms: | ||
amd64: | ||
arm64: | ||
s390x: | ||
parts: | ||
# Include extra files in the packed charm | ||
include: | ||
plugin: dump | ||
source: . | ||
prime: | ||
- hooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
type: "charm" | ||
base: [email protected] | ||
platforms: | ||
amd64: | ||
arm64: | ||
s390x: | ||
parts: | ||
# Include extra files in the packed charm | ||
include: | ||
plugin: dump | ||
source: . | ||
prime: | ||
- hooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,12 @@ | ||
type: "charm" | ||
bases: | ||
- build-on: | ||
- name: "ubuntu" | ||
channel: "20.04" | ||
architectures: ["amd64", "arm64"] | ||
run-on: | ||
- name: "ubuntu" | ||
channel: "22.04" | ||
architectures: | ||
- amd64 | ||
- aarch64 | ||
- arm64 | ||
- s390x | ||
- name: "ubuntu" | ||
channel: "20.04" | ||
architectures: | ||
- amd64 | ||
- aarch64 | ||
- arm64 | ||
- s390x | ||
- name: "ubuntu" | ||
channel: "18.04" | ||
architectures: | ||
- amd64 | ||
- aarch64 | ||
- arm64 | ||
- s390x | ||
- name: "ubuntu" | ||
channel: "16.04" | ||
architectures: | ||
- amd64 | ||
- aarch64 | ||
- arm64 | ||
- s390x | ||
base: [email protected] | ||
platforms: | ||
amd64: | ||
arm64: | ||
s390x: | ||
parts: | ||
tiny-bash: | ||
# Include extra files in the packed charm | ||
include: | ||
plugin: dump | ||
source: . | ||
prime: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,16 @@ | ||
type: "charm" | ||
bases: | ||
- build-on: | ||
- name: "ubuntu" | ||
channel: "20.04" | ||
architectures: ["amd64", "arm64"] | ||
run-on: | ||
- name: "ubuntu" | ||
channel: "22.04" | ||
architectures: | ||
- amd64 | ||
- aarch64 | ||
- arm64 | ||
- s390x | ||
- name: "ubuntu" | ||
channel: "20.04" | ||
architectures: | ||
- amd64 | ||
- aarch64 | ||
- arm64 | ||
- s390x | ||
- name: "ubuntu" | ||
channel: 18.04" | ||
architectures: | ||
- amd64 | ||
- aarch64 | ||
- arm64 | ||
- s390x | ||
- name: "ubuntu" | ||
channel: "16.04" | ||
architectures: | ||
- amd64 | ||
- aarch64 | ||
- arm64 | ||
- s390x | ||
base: [email protected] | ||
platforms: | ||
amd64: | ||
arm64: | ||
s390x: | ||
parts: | ||
tiny-bash: | ||
# Include extra files in the packed charm | ||
include: | ||
plugin: dump | ||
source: . | ||
prime: | ||
- README.md | ||
- config.yaml | ||
- hooks | ||
- icon.svg | ||
- lxd-profile.yaml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
type: "charm" | ||
base: [email protected] | ||
platforms: | ||
amd64: | ||
arm64: | ||
s390x: | ||
parts: | ||
# Include extra files in the packed charm | ||
include: | ||
plugin: dump | ||
source: . | ||
prime: | ||
- hooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
type: "charm" | ||
base: [email protected] | ||
platforms: | ||
amd64: | ||
arm64: | ||
s390x: | ||
parts: | ||
# Include extra files in the packed charm | ||
include: | ||
plugin: dump | ||
source: . | ||
prime: | ||
- hooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
type: "charm" | ||
base: [email protected] | ||
platforms: | ||
amd64: | ||
arm64: | ||
s390x: | ||
parts: | ||
# Include extra files in the packed charm | ||
include: | ||
plugin: dump | ||
source: . | ||
prime: | ||
- hooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
type: "charm" | ||
base: [email protected] | ||
platforms: | ||
amd64: | ||
arm64: | ||
s390x: | ||
parts: | ||
# Include extra files in the packed charm | ||
include: | ||
plugin: dump | ||
source: . | ||
prime: | ||
- hooks | ||
- revision |
Oops, something went wrong.