Skip to content

Commit

Permalink
Last fixes for ineffassign
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonRichardson committed Aug 15, 2019
1 parent 08516f3 commit e3f8992
Show file tree
Hide file tree
Showing 77 changed files with 145 additions and 6 deletions.
2 changes: 2 additions & 0 deletions cmd/juju/commands/machine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func (s *MachineSuite) TestMachineAdd(c *gc.C) {
count := len(machines)

ctx, err := s.RunCommand(c, "add-machine")
c.Assert(err, jc.ErrorIsNil)
c.Assert(cmdtesting.Stderr(ctx), jc.Contains, `created machine`)

machines, err = s.State.AllMachines()
Expand All @@ -49,6 +50,7 @@ func (s *MachineSuite) TestMachineRemove(c *gc.C) {
machine := s.Factory.MakeMachine(c, nil)

ctx, err := s.RunCommand(c, "remove-machine", machine.Id())
c.Assert(err, jc.ErrorIsNil)
c.Assert(cmdtesting.Stdout(ctx), gc.Equals, "")

err = machine.Refresh()
Expand Down
2 changes: 2 additions & 0 deletions cmd/juju/commands/switch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ func (s *SwitchSimpleSuite) TestSwitchControllerSameNameAsModel(c *gc.C) {
_, err := s.run(c, "new:mymodel")
c.Assert(err, jc.ErrorIsNil)
context, err := s.run(c, "old")
c.Assert(err, jc.ErrorIsNil)
c.Assert(cmdtesting.Stderr(context), gc.Equals, "new:admin/mymodel -> old (controller)\n")
}

Expand All @@ -212,6 +213,7 @@ func (s *SwitchSimpleSuite) TestSwitchControllerSameNameAsModelExplicitModel(c *
_, err := s.run(c, "new:mymodel")
c.Assert(err, jc.ErrorIsNil)
context, err := s.run(c, ":old")
c.Assert(err, jc.ErrorIsNil)
c.Assert(cmdtesting.Stderr(context), gc.Equals, "new:admin/mymodel -> new:admin/old\n")
}

Expand Down
2 changes: 2 additions & 0 deletions cmd/juju/model/configcommand_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ func (s *ConfigCommandSuite) TestPassesValues(c *gc.C) {

func (s *ConfigCommandSuite) TestPassesCloudInitUserDataLong(c *gc.C) {
modelCfg, err := s.fake.ModelGet()
c.Assert(err, jc.ErrorIsNil)
modelCfg["cloudinit-userdata"] = "test data"
err = s.fake.ModelSet(modelCfg)
c.Assert(err, jc.ErrorIsNil)
Expand All @@ -245,6 +246,7 @@ func (s *ConfigCommandSuite) TestPassesCloudInitUserDataLong(c *gc.C) {

func (s *ConfigCommandSuite) TestPassesCloudInitUserDataShort(c *gc.C) {
modelCfg, err := s.fake.ModelGet()
c.Assert(err, jc.ErrorIsNil)
modelCfg["cloudinit-userdata"] = ""
err = s.fake.ModelSet(modelCfg)
c.Assert(err, jc.ErrorIsNil)
Expand Down
2 changes: 2 additions & 0 deletions cmd/juju/status/status_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4256,6 +4256,7 @@ func (s setUnitAsLeader) step(c *gc.C, ctx *context) {
// manager running in the state workers collection.
stater := ctx.env.(testing.GetStater)
claimer, err := stater.GetLeaseManagerInAPIServer().Claimer("application-leadership", ctx.st.ModelUUID())
c.Assert(err, jc.ErrorIsNil)

err = claimer.Claim(u.ApplicationName(), u.Name(), time.Minute)
c.Assert(err, jc.ErrorIsNil)
Expand Down Expand Up @@ -4484,6 +4485,7 @@ func (s trackBranch) step(c *gc.C, ctx *context) {
gen, err := ctx.st.Branch(s.branch)
c.Assert(err, jc.ErrorIsNil)
err = gen.AssignUnit(s.unitName)
c.Assert(err, jc.ErrorIsNil)
}

type scopedExpect struct {
Expand Down
1 change: 1 addition & 0 deletions cmd/jujud/agent/agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type acCreator func() (cmd.Command, AgentConf)
func CheckAgentCommand(c *gc.C, create acCreator, args []string) cmd.Command {
com, conf := create()
err := cmdtesting.InitCommand(com, args)
c.Assert(err, jc.ErrorIsNil)
dataDir, err := paths.DataDir(series.MustHostSeries())
c.Assert(err, jc.ErrorIsNil)
c.Assert(conf.DataDir(), gc.Equals, dataDir)
Expand Down
2 changes: 2 additions & 0 deletions cmd/jujud/agent/bootstrap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ func (s *BootstrapSuite) TestGUIArchiveInfoNotFound(c *gc.C) {
defer loggo.RemoveWriter("bootstrap-test")

err = cmd.Run(nil)
c.Assert(err, jc.ErrorIsNil)
c.Assert(tw.Log(), jc.LogMatches, jc.SimpleMessages{{
loggo.WARNING,
`cannot set up Juju GUI: cannot fetch GUI info: GUI metadata not found`,
Expand Down Expand Up @@ -233,6 +234,7 @@ func (s *BootstrapSuite) TestGUIArchiveError(c *gc.C) {
defer loggo.RemoveWriter("bootstrap-test")

err = cmd.Run(nil)
c.Assert(err, jc.ErrorIsNil)
c.Assert(tw.Log(), jc.LogMatches, jc.SimpleMessages{{
loggo.WARNING,
`cannot set up Juju GUI: cannot read GUI archive: .*`,
Expand Down
2 changes: 1 addition & 1 deletion cmd/jujud/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func (s *RunTestSuite) TestNoContextWithLock(c *gc.C) {
c.Assert(err, jc.ErrorIsNil)

channel := s.startRunAsync(c, []string{"--no-context", "echo done"})
_, err := waitForResult(channel, testing.ShortWait)
_, err = waitForResult(channel, testing.ShortWait)
c.Assert(err, gc.ErrorMatches, "timeout")

releaser()
Expand Down
2 changes: 2 additions & 0 deletions core/auditlog/auditlog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ func (s *AuditLogSuite) TestAuditLogFile(c *gc.C) {
c.Assert(err, jc.ErrorIsNil)

bytes, err := ioutil.ReadFile(filepath.Join(dir, "audit.log"))
c.Assert(err, jc.ErrorIsNil)
c.Assert(string(bytes), gc.Equals, expectedLogContents)
}

Expand Down Expand Up @@ -103,6 +104,7 @@ func (s *AuditLogSuite) TestRecorder(c *gc.C) {
Code: "bad request",
}},
})
c.Assert(err, jc.ErrorIsNil)

log.stub.CheckCallNames(c, "AddConversation", "AddRequest", "AddResponse")
calls := log.stub.Calls()
Expand Down
1 change: 1 addition & 0 deletions environs/simplestreams/datasource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func (s *datasourceSuite) TestFetch(c *gc.C) {
defer rc.Close()
c.Assert(url, gc.Equals, "test:/streams/v1/tools_metadata.json")
data, err := ioutil.ReadAll(rc)
c.Assert(err, jc.ErrorIsNil)
cloudMetadata, err := simplestreams.ParseCloudMetadata(data, "products:1.0", url, imagemetadata.ImageMetadata{})
c.Assert(err, jc.ErrorIsNil)
c.Assert(len(cloudMetadata.Products), jc.GreaterThan, 0)
Expand Down
2 changes: 2 additions & 0 deletions environs/storage/storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func (s *datasourceSuite) TestFetch(c *gc.C) {
defer rc.Close()
c.Assert(url, gc.Equals, s.baseURL+"/foo/bar/data.txt")
data, err := ioutil.ReadAll(rc)
c.Assert(err, jc.ErrorIsNil)
c.Assert(data, gc.DeepEquals, []byte(sampleData))
}

Expand All @@ -64,6 +65,7 @@ func (s *datasourceSuite) TestFetchWithBasePath(c *gc.C) {
defer rc.Close()
c.Assert(url, gc.Equals, s.baseURL+"/base/foo/bar/data.txt")
data, err := ioutil.ReadAll(rc)
c.Assert(err, jc.ErrorIsNil)
c.Assert(data, gc.DeepEquals, []byte(sampleData))
}

Expand Down
1 change: 1 addition & 0 deletions environs/tools/marshal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ func assertIndex(c *gc.C, obtainedIndex []byte, expectedIndex string) {
// Unmarshall into objects so an order independent comparison can be done.
var obtained interface{}
err := json.Unmarshal(obtainedIndex, &obtained)
c.Assert(err, jc.ErrorIsNil)
var expected interface{}
err = json.Unmarshal([]byte(expectedIndex), &expected)
c.Assert(err, jc.ErrorIsNil)
Expand Down
1 change: 1 addition & 0 deletions environs/tools/simplestreams_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,7 @@ func (*metadataHelperSuite) TestReadMetadataPrefersNewIndex(c *gc.C) {

// Read back all metadata, expecting to find metadata in index2.json.
out, err := tools.ReadAllMetadata(stor)
c.Assert(err, jc.ErrorIsNil)
for _, outMetadata := range out {
for _, md := range outMetadata {
// FullPath is set by ReadAllMetadata.
Expand Down
2 changes: 1 addition & 1 deletion featuretests/cmd_juju_credential_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ clouds:
}),
},
})
ctx, err = s.run(c, "update-credential", "dummy", "cred")
ctx, err := s.run(c, "update-credential", "dummy", "cred")
c.Assert(err, jc.ErrorIsNil)

c.Assert(cmdtesting.Stderr(ctx), gc.Equals, `
Expand Down
1 change: 1 addition & 0 deletions featuretests/cmd_juju_crossmodel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ func (s *crossmodelSuite) addOtherModelApplication(c *gc.C) *state.State {
Name: "mysql",
Charm: ch,
})
c.Assert(err, jc.ErrorIsNil)

offersAPi := state.NewApplicationOffers(otherModel)
_, err = offersAPi.AddOffer(jujucrossmodel.AddApplicationOfferArgs{
Expand Down
1 change: 1 addition & 0 deletions featuretests/cmdjuju_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func (s *cmdJujuSuite) TestGetConstraints(c *gc.C) {
c.Assert(err, jc.ErrorIsNil)

context, err := cmdtesting.RunCommand(c, application.NewApplicationGetConstraintsCommand(), "app")
c.Assert(err, jc.ErrorIsNil)
c.Assert(cmdtesting.Stdout(context), gc.Equals, "cores=64\n")
c.Assert(cmdtesting.Stderr(context), gc.Equals, "")
}
Expand Down
2 changes: 2 additions & 0 deletions mongo/mongodfinder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ func (s *OSSearchToolsSuite) TestGetCommandOutputExitNonzero(c *gc.C) {
echo "hello $1"
exit 1
`), 0755)
c.Assert(err, gc.NotNil)
tools := mongo.OSSearchTools{}
out, err := tools.GetCommandOutput(path, "argument")
c.Assert(err, gc.NotNil)
Expand All @@ -323,6 +324,7 @@ func (s *OSSearchToolsSuite) TestGetCommandOutputNonExecutable(c *gc.C) {
err := ioutil.WriteFile(path, []byte(`#!/bin/bash --norc
echo "shouldn't happen $1"
`), 0644)
c.Assert(err, gc.NotNil)
tools := mongo.OSSearchTools{}
out, err := tools.GetCommandOutput(path, "argument")
c.Assert(err, gc.NotNil)
Expand Down
5 changes: 5 additions & 0 deletions network/containerizer/bridgepolicy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ func (s *bridgePolicyStateSuite) TestPopulateContainerLinkLayerDevicesCorrectlyP
CIDR: subnetCIDR,
SpaceName: "default",
})
c.Assert(err, jc.ErrorIsNil)
devAddresses[i] = state.LinkLayerDeviceAddress{
DeviceName: devArg.Name,
CIDRAddress: fmt.Sprintf("10.%d.0.10/24", subnet),
Expand Down Expand Up @@ -914,6 +915,7 @@ func (s *bridgePolicyStateSuite) TestFindMissingBridgesForContainerTwoSpacesOneB
err := s.containerMachine.SetConstraints(constraints.Value{
Spaces: &[]string{"default", "dmz"},
})
c.Assert(err, jc.ErrorIsNil)
missing, reconfigureDelay, err := s.bridgePolicy.FindMissingBridgesForContainer(s.machine, s.containerMachine)
c.Assert(err, jc.ErrorIsNil)
// both default and dmz are needed, but default needs to be bridged
Expand All @@ -937,6 +939,7 @@ func (s *bridgePolicyStateSuite) TestFindMissingBridgesForContainerMultipleSpace
err := s.containerMachine.SetConstraints(constraints.Value{
Spaces: &[]string{"default", "dmz", "abba"},
})
c.Assert(err, jc.ErrorIsNil)
missing, reconfigureDelay, err := s.bridgePolicy.FindMissingBridgesForContainer(s.machine, s.containerMachine)
c.Assert(err, jc.ErrorIsNil)
// both default and dmz are needed, but default needs to be bridged
Expand Down Expand Up @@ -980,6 +983,7 @@ func (s *bridgePolicyStateSuite) TestFindMissingBridgesForContainerBondedNICs(c
IsUp: true,
},
)
c.Assert(err, jc.ErrorIsNil)
err = s.machine.SetDevicesAddresses(
state.LinkLayerDeviceAddress{
DeviceName: "zbond0",
Expand Down Expand Up @@ -1007,6 +1011,7 @@ func (s *bridgePolicyStateSuite) TestFindMissingBridgesForContainerBondedNICs(c
err = s.containerMachine.SetConstraints(constraints.Value{
Spaces: &[]string{"default"},
})
c.Assert(err, jc.ErrorIsNil)
missing, reconfigureDelay, err := s.bridgePolicy.FindMissingBridgesForContainer(s.machine, s.containerMachine)
c.Assert(err, jc.ErrorIsNil)
// both default and dmz are needed, but default needs to be bridged
Expand Down
2 changes: 1 addition & 1 deletion network/fan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (*FanConfigSuite) TestCalculateOverlaySegment(c *gc.C) {
func (*FanConfigSuite) TestCalculateOverlaySegmentNonIPv4FanAddress(c *gc.C) {
// Use mapping from smaller IPv6 subnet to larger overlay.
config, err := network.ParseFanConfig("2001:db8::/16=2001:db7::/8")

c.Assert(err, jc.ErrorIsNil)
// CalculateOverlaySegment does not support IPv6 addresses.
_, err = network.CalculateOverlaySegment("2001:db8::/16", config[0])
c.Assert(err, gc.ErrorMatches, "fan address is not an IPv4 address.")
Expand Down
6 changes: 6 additions & 0 deletions network/netplan/netplan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1439,6 +1439,7 @@ network:
}

data, err := ioutil.ReadFile(generatedFile)
c.Assert(err, jc.ErrorIsNil)
c.Check(string(data), gc.Equals, expected)

err = np.Rollback()
Expand Down Expand Up @@ -1467,6 +1468,7 @@ network:
c.Assert(err, jc.ErrorIsNil)
c.Check(outPath, gc.Equals, myPath)
data, err = ioutil.ReadFile(outPath)
c.Assert(err, jc.ErrorIsNil)
c.Check(string(data), gc.Equals, expected)

err = np.MoveYamlsToBak()
Expand All @@ -1486,13 +1488,15 @@ func (s *NetplanSuite) TestReadDirectoryAccessDenied(c *gc.C) {
coretesting.SkipIfWindowsBug(c, "lp:1771077")
tempDir := c.MkDir()
err := ioutil.WriteFile(path.Join(tempDir, "00-file.yaml"), []byte("network:\n"), 00000)
c.Assert(err, jc.ErrorIsNil)
_, err = netplan.ReadDirectory(tempDir)
c.Check(err, gc.ErrorMatches, "open .*/00-file.yaml: permission denied")
}

func (s *NetplanSuite) TestReadDirectoryBrokenYaml(c *gc.C) {
tempDir := c.MkDir()
err := ioutil.WriteFile(path.Join(tempDir, "00-file.yaml"), []byte("I am not a yaml file!\nreally!\n"), 0644)
c.Assert(err, jc.ErrorIsNil)
_, err = netplan.ReadDirectory(tempDir)
c.Check(err, gc.ErrorMatches, "yaml: unmarshal errors:\n.*")
}
Expand Down Expand Up @@ -1544,6 +1548,7 @@ network:
c.Assert(err, jc.ErrorIsNil)

fileName, err := np.Write("")
c.Assert(err, jc.ErrorIsNil)

writtenContent, err := ioutil.ReadFile(fileName)
c.Assert(err, jc.ErrorIsNil)
Expand Down Expand Up @@ -1604,6 +1609,7 @@ func (s *NetplanSuite) TestNetplanExamples(c *gc.C) {
c.Check(err, jc.ErrorIsNil, gc.Commentf("failed to marshal %s", example.filename))
var roundtripped map[interface{}]interface{}
err = yaml.UnmarshalStrict(out, &roundtripped)
c.Assert(err, jc.ErrorIsNil)
if !reflect.DeepEqual(orig, roundtripped) {
pretty.Ldiff(c, orig, roundtripped)
c.Errorf("marshalling and unmarshalling %s did not contain the same content", example.filename)
Expand Down
1 change: 1 addition & 0 deletions provider/azure/storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,7 @@ func (s *storageSuite) TestDescribeVolumesWithInvalidCredential(c *gc.C) {

c.Assert(s.invalidCredential, jc.IsFalse)
_, err := volumeSource.DescribeVolumes(s.cloudCallCtx, []string{"volume-0"})
c.Assert(err, jc.ErrorIsNil)
results, err := volumeSource.DescribeVolumes(s.cloudCallCtx, []string{"volume-0"})
c.Assert(err, jc.ErrorIsNil)
c.Assert(results[0].Error, gc.NotNil)
Expand Down
2 changes: 2 additions & 0 deletions provider/common/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ func (suite *StateSuite) TestRemoveStateInstancesPartial(c *gc.C) {
c.Assert(err, jc.ErrorIsNil)

storedState, err := common.LoadState(storage)
c.Assert(err, jc.ErrorIsNil)
c.Assert(storedState, gc.DeepEquals, &common.BootstrapState{
StateInstances: []instance.Id{
state.StateInstances[1],
Expand All @@ -191,6 +192,7 @@ func (suite *StateSuite) TestRemoveStateInstancesNone(c *gc.C) {
c.Assert(err, jc.ErrorIsNil)

storedState, err := common.LoadState(storage)
c.Assert(err, jc.ErrorIsNil)
c.Assert(storedState, gc.DeepEquals, &state)
}

Expand Down
2 changes: 2 additions & 0 deletions provider/maas/storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ func (s *storageSuite) TestRetrieveFileObjectReturnsFileObject(c *gc.C) {
c.Assert(err, jc.ErrorIsNil)
c.Check(uri, gc.Equals, fileURI)
content, err := obj.GetField("content")
c.Assert(err, jc.ErrorIsNil)
c.Check(content, gc.Equals, fileContent)
}

Expand Down Expand Up @@ -241,6 +242,7 @@ func (s *storageSuite) TestPutStoresRetrievableFile(c *gc.C) {
stor := NewStorage(s.makeEnviron())

err := stor.Put(filename, bytes.NewReader(contents), length)
c.Assert(err, jc.ErrorIsNil)

reader, err := storage.Get(stor, filename)
c.Assert(err, jc.ErrorIsNil)
Expand Down
2 changes: 1 addition & 1 deletion provider/openstack/credentials_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ OS_PROJECT_DOMAIN_NAME=project-domain
`[1:]
novarc := filepath.Join(dir, ".novarc")
err = ioutil.WriteFile(novarc, []byte(content), 0600)

c.Assert(err, jc.ErrorIsNil)
credentials, err := s.provider.DetectCredentials()
c.Assert(err, jc.ErrorIsNil)
c.Assert(credentials.DefaultRegion, gc.Equals, "region")
Expand Down
2 changes: 2 additions & 0 deletions provider/openstack/local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1772,6 +1772,7 @@ func (s *localServerSuite) TestMatchingGroup(c *gc.C) {
}

err := bootstrapEnv(c, s.env)
c.Assert(err, jc.ErrorIsNil)
group1, err := openstack.EnsureGroup(s.env, s.callCtx,
openstack.MachineGroupName(s.env, s.ControllerUUID, "1"), rule)
c.Assert(err, jc.ErrorIsNil)
Expand Down Expand Up @@ -2972,6 +2973,7 @@ func (s *noSwiftSuite) SetUpTest(c *gc.C) {
envtesting.UploadFakeTools(c, toolsStorage, "released", "released")
s.PatchValue(&tools.DefaultBaseURL, storageDir)
imageStorage, err := filestorage.NewFileStorageWriter(imagesDir)
c.Assert(err, jc.ErrorIsNil)
openstack.UseTestImageData(imageStorage, s.cred)
imagetesting.PatchOfficialDataSources(&s.CleanupSuite, storageDir)

Expand Down
1 change: 1 addition & 0 deletions provider/openstack/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ regions:
c.Assert(err, jc.ErrorIsNil)

p, err := environs.Provider("openstack")
c.Assert(err, jc.ErrorIsNil)
err = p.CloudSchema().Validate(v)
c.Assert(err, jc.ErrorIsNil)
}
Expand Down
2 changes: 2 additions & 0 deletions scripts/golinters.bash
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ fi
$GOPATH/bin/golangci-lint run \
--disable-all \
--no-config \
--max-issues-per-linter=50 \
--max-same-issues=50 \
--issues-exit-code=0 \
--enable=gofmt \
--enable=goimports \
Expand Down
1 change: 1 addition & 0 deletions service/systemd/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@ func (s *initSystemSuite) TestInstallZombie(c *gc.C) {
s.expectConf(c, conf)
conf.Env["a"] = "c"
svc, err := systemd.NewService(s.name, conf, "/lib/systemd/system", func() (systemd.DBusAPI, error) { return s.dBus, nil }, renderer.Join(s.dataDir, "init"))
c.Assert(err, jc.ErrorIsNil)

dirName := fmt.Sprintf("%s/%s", "/lib/systemd/system", s.name)
fileName := fmt.Sprintf("%s/%s.service", dirName, s.name)
Expand Down
2 changes: 1 addition & 1 deletion state/action_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,7 @@ func (s *ActionPruningSuite) TestDoNotPruneIncompleteActions(c *gc.C) {
const numZeroValueEntries = 5
state.PrimeActions(c, time.Time{}, unit, numZeroValueEntries)

_, err := unit.Actions()
_, err = unit.Actions()
c.Assert(err, jc.ErrorIsNil)

err = state.PruneActions(s.State, 1*time.Hour, 0)
Expand Down
Loading

0 comments on commit e3f8992

Please sign in to comment.