Skip to content

Commit

Permalink
Fix DeploySuite.TestDeployBundleWithOffers;
Browse files Browse the repository at this point in the history
  • Loading branch information
ycliuhw committed Aug 30, 2022
1 parent 2042ee5 commit dc97be6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
10 changes: 1 addition & 9 deletions cmd/juju/application/deploy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ func (s *DeploySuite) TestDeployBundleWithOffers(c *gc.C) {
s.fakeAPI.Call("ListSpaces").Returns([]params.Space{{Name: "alpha", Id: "0"}}, error(nil))

deploy := s.deployCommand()
bundlePath := testcharms.RepoWithSeries("bionic").ClonedBundleDirPath(c.MkDir(), "apache2-with-offers")
bundlePath := testcharms.RepoWithSeries("bionic").ClonedBundleDirPath(c.MkDir(), "apache2-with-offers-legacy")
_, err := cmdtesting.RunCommand(c, modelcmd.Wrap(deploy), bundlePath)
c.Assert(err, jc.ErrorIsNil)

Expand Down Expand Up @@ -2132,14 +2132,6 @@ func (s *FakeStoreStateSuite) setupBundle(c *gc.C, url, name string, series ...s
}
}

func (s *FakeStoreStateSuite) combinedSettings(ch charm.Charm, inSettings charm.Settings) charm.Settings {
result := ch.Config().DefaultSettings()
for name, value := range inSettings {
result[name] = value
}
return result
}

// assertCharmsUploaded checks that the given charm ids have been uploaded.
func (s *FakeStoreStateSuite) assertCharmsUploaded(c *gc.C, ids ...string) {
allCharms, err := s.State.AllCharms()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A bundle installing apache2 and exposing two offers for its endpoints
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
series: bionic
applications:
apache2:
charm: cs:apache2-26
---
series: bionic
applications:
apache2:
offers:
my-offer:
endpoints:
- apache-website
- website-cache
acl:
admin: admin
bar: consume
my-other-offer:
endpoints:
- apache-website

0 comments on commit dc97be6

Please sign in to comment.