Skip to content

Commit

Permalink
Merge pull request #15636 from jack-w-shaw/JUJU-3822_replace_ubuntu_w…
Browse files Browse the repository at this point in the history
…ith_juju_qa_fixed_rev

#15636

run_refresh_channel_no_new_revision is intended to test charms are
correctly refreshed to a new channel even if the revision doesn't
change.

Use a test charm purpose built for this, as we cannot guarantee this
will be the case for any other charm

## Checklist

- [x] Code style: imports ordered, good names, simple structure, etc
- ~[ ] 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

```sh
./main.sh -v -c aws -p ec2 refresh test_basic
```
  • Loading branch information
jujubot committed May 24, 2023
2 parents 98fdb34 + 1672b51 commit 1a2759d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/suites/refresh/refresh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,16 @@ run_refresh_channel_no_new_revision() {

ensure "${model_name}" "${file}"

juju deploy ubuntu
wait_for "ubuntu" "$(idle_condition "ubuntu")"
juju deploy juju-qa-fixed-rev
wait_for "juju-qa-fixed-rev" "$(idle_condition "juju-qa-fixed-rev")"
# get revision to ensure it doesn't change
cs_revision=$(juju status --format json | jq -S '.applications | .["ubuntu"] | .["charm-rev"]')
cs_revision=$(juju status --format json | jq -S '.applications | .["juju-qa-fixed-rev"] | .["charm-rev"]')

juju refresh ubuntu --channel edge
juju refresh juju-qa-fixed-rev --channel edge

wait_for "ubuntu" "$(charm_channel "ubuntu" "edge")"
wait_for "ubuntu" "$(charm_rev "ubuntu" "${cs_revision}")"
wait_for "ubuntu" "$(idle_condition "ubuntu")"
wait_for "juju-qa-fixed-rev" "$(charm_channel "juju-qa-fixed-rev" "edge")"
wait_for "juju-qa-fixed-rev" "$(charm_rev "juju-qa-fixed-rev" "${cs_revision}")"
wait_for "juju-qa-fixed-rev" "$(idle_condition "juju-qa-fixed-rev")"

destroy_model "${model_name}"
}
Expand Down

0 comments on commit 1a2759d

Please sign in to comment.