Skip to content

Commit

Permalink
Remove the last vigil of tests using i386
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonRichardson committed Apr 26, 2023
1 parent 2c9d402 commit 88a4885
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func (s *firewallerBaseSuite) testInstanceId(
// Provision 2 machines first.
err := s.machines[0].SetProvisioned("i-am", "", "fake_nonce", nil)
c.Assert(err, jc.ErrorIsNil)
hwChars := instance.MustParseHardware("arch=i386", "mem=4G")
hwChars := instance.MustParseHardware("arch=s390x", "mem=4G")
err = s.machines[1].SetProvisioned("i-am-not", "", "fake_nonce", &hwChars)
c.Assert(err, jc.ErrorIsNil)

Expand Down
4 changes: 2 additions & 2 deletions cloudconfig/machinecloudconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ reporting:
type: webhook}
system_info:
package_mirrors:
- arches: [i386, amd64]
- arches: [s390x, amd64]
failsafe: {primary: 'http://archive.ubuntu.com/ubuntu', security: 'http://security.ubuntu.com/ubuntu'}
search:
primary: ['http://archive.ubuntu.com/ubuntu']
Expand Down Expand Up @@ -374,7 +374,7 @@ var expectedResult = map[string]interface{}{

var expectedSystemInfoCommon = map[interface{}]interface{}{
"package_mirrors": []interface{}{map[interface{}]interface{}{
"arches": []interface{}{"i386", "amd64"},
"arches": []interface{}{"s390x", "amd64"},
"failsafe": map[interface{}]interface{}{
"primary": "http://archive.ubuntu.com/ubuntu",
"security": "http://security.ubuntu.com/ubuntu",
Expand Down
8 changes: 4 additions & 4 deletions cmd/juju/application/bundle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ type BundleDeployCharmStoreSuite struct {
var _ = gc.Suite(&BundleDeployCharmStoreSuite{})

func (s *BundleDeployCharmStoreSuite) SetUpSuite(c *gc.C) {
c.Skip("this is a badly written e2e test that is invoking external APIs which we cannot mock0")
c.Skip("this is a badly written e2e test that is invoking external APIs which we cannot mock")

s.DeploySuiteBase.SetUpSuite(c)
s.PatchValue(&watcher.Period, 10*time.Millisecond)
Expand Down Expand Up @@ -560,7 +560,7 @@ func (s *BundleDeployCharmStoreSuite) TestDeployBundleApplicationDefaultArchCons

func (s *BundleDeployCharmStoreSuite) TestDeployBundleApplicationConstraints(c *gc.C) {
wpch := s.setupCharm(c, "ch:xenial/wordpress-42", "wordpress", "bionic")
dch := s.setupCharmWithArch(c, "ch:bionic/dummy-0", "dummy", "bionic", "i386")
dch := s.setupCharmWithArch(c, "ch:bionic/dummy-0", "dummy", "bionic", "s390x")

err := s.DeployBundleYAML(c, `
applications:
Expand All @@ -574,14 +574,14 @@ func (s *BundleDeployCharmStoreSuite) TestDeployBundleApplicationConstraints(c *
channel: stable
series: xenial
num_units: 1
constraints: arch=i386
constraints: arch=s390x
`)
c.Assert(err, jc.ErrorIsNil)
s.assertCharmsUploaded(c, "ch:bionic/dummy-0", "ch:xenial/wordpress-42")
s.assertApplicationsDeployed(c, map[string]applicationInfo{
"customized": {
charm: "ch:bionic/dummy-0",
constraints: constraints.MustParse("arch=i386"),
constraints: constraints.MustParse("arch=s390x"),
config: dch.Config().DefaultSettings(),
},
"wordpress": {
Expand Down
9 changes: 3 additions & 6 deletions environs/bootstrap/bootstrap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,9 @@ func (s *bootstrapSuite) setupProviderWithSomeSupportedArches(c *gc.C) bootstrap
// test provider constraints only has amd64 and arm64 as supported architectures
consBefore, err := env.ConstraintsValidator(envcontext.NewEmptyCloudCallContext())
c.Assert(err, jc.ErrorIsNil)
desiredArch := constraints.MustParse("arch=i386")
desiredArch := constraints.MustParse("arch=s390x")
unsupported, err := consBefore.Validate(desiredArch)
c.Assert(err.Error(), jc.Contains, `invalid constraint value: arch=i386`)
c.Assert(err.Error(), jc.Contains, `invalid constraint value: arch=s390x`)
c.Assert(unsupported, gc.HasLen, 0)

return env
Expand Down Expand Up @@ -558,7 +558,7 @@ func (s *bootstrapSuite) setupProviderWithNoSupportedArches(c *gc.C) bootstrapEn
consBefore, err := env.ConstraintsValidator(envcontext.NewEmptyCloudCallContext())
c.Assert(err, jc.ErrorIsNil)
// test provider constraints only has amd64 and arm64 as supported architectures
desiredArch := constraints.MustParse("arch=i386")
desiredArch := constraints.MustParse("arch=s390x")
unsupported, err := consBefore.Validate(desiredArch)
c.Assert(err, jc.ErrorIsNil)
c.Assert(unsupported, gc.HasLen, 0)
Expand Down Expand Up @@ -745,9 +745,6 @@ func (s *bootstrapSuite) assertBootstrapPackagedToolsAvailable(c *gc.C, clientAr
// such as s390.
s.PatchValue(&arch.HostArch, func() string { return clientArch })
toolsArch := clientArch
if toolsArch == "i386" {
toolsArch = "amd64"
}
findToolsOk := false
s.PatchValue(bootstrap.FindTools, func(_ envtools.SimplestreamsFetcher, _ environs.BootstrapEnviron, _ int, _ int, _ []string, filter tools.Filter) (tools.List, error) {
c.Assert(filter.Arch, gc.Equals, toolsArch)
Expand Down

0 comments on commit 88a4885

Please sign in to comment.