c.Assert(err, gc.ErrorMatches, "cannot change a service's series")
800
c.Assert(err, gc.ErrorMatches, `cannot upgrade application "application" to charm "cs:~who/trusty/dummy-1": cannot change an application's series`)
799
801
}
800
802
801
803
func (s *serviceSuite) TestServiceSetCharmUnsupportedSeries(c *gc.C) {
823
825
ApplicationName: "application",
824
826
CharmUrl: curl.String(),
825
827
})
826
c.Assert(err, gc.ErrorMatches, "cannot upgrade charm, only these series are supported: trusty, wily")
828
c.Assert(err, gc.ErrorMatches, `cannot upgrade application "application" to charm "cs:~who/multi-series-1": only these series are supported: trusty, wily`)
827
829
}
828
830
829
831
func (s *serviceSuite) assertServiceSetCharmSeries(c *gc.C, upgradeCharm, series string) {
899
901
CharmUrl: curl.String(),
900
902
ForceSeries: true,
901
903
})
902
c.Assert(err, gc.ErrorMatches, `cannot upgrade charm, OS "Ubuntu" not supported by charm`)
904
c.Assert(err, gc.ErrorMatches, `cannot upgrade application "application" to charm "cs:~who/multi-series-windows-0": OS "Ubuntu" not supported by charm`)