Skip to content

Commit

Permalink
fixed formatting
Browse files Browse the repository at this point in the history
Signed-off-by: dmitriy kalinin <[email protected]>
  • Loading branch information
Karl Isenberg committed Sep 11, 2014
1 parent 2799aff commit c545856
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion platform/disk/root_device_partitioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (p rootDevicePartitioner) Partition(devicePath string, partitions []Partiti
len(existingPartitions),
existingPartitions,
)
return bosherr.New("Found %d unexpected partitions on `%s'", len(existingPartitions)-1, devicePath)
return bosherr.New("Found %d unexpected partitions on `%s'", len(existingPartitions)-1, devicePath)
}

for index, partition := range partitions {
Expand Down
5 changes: 3 additions & 2 deletions platform/linux_platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ func (p linux) SetupEphemeralDiskWithPath(realPath string) error {
}

var swapPartitionPath, dataPartitionPath string

if realPath == "" {
if !p.options.CreatePartitionIfNoEphemeralDisk {
p.logger.Info(logTag, "No ephemeral disk found, using root partition as ephemeral disk")
Expand All @@ -395,9 +396,9 @@ func (p linux) SetupEphemeralDiskWithPath(realPath string) error {
if isInsufficentSpaceError {
p.logger.Warn(logTag, "No partitions created on root device, using root partition as ephemeral disk", err)
return nil
} else {
return bosherr.WrapError(err, "Creating ephemeral partitions on root device")
}

return bosherr.WrapError(err, "Creating ephemeral partitions on root device")
}
} else {
swapPartitionPath, dataPartitionPath, err = p.partitionEphemeralDisk(realPath)
Expand Down
10 changes: 5 additions & 5 deletions platform/linux_platform_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var _ = Describe("LinuxPlatform", func() {
vitalsService boshvitals.Service
netManager *fakenet.FakeManager
options LinuxOptions
logger boshlog.Logger
logger boshlog.Logger
)

BeforeEach(func() {
Expand Down Expand Up @@ -616,13 +616,13 @@ fake-base-path/data/sys/log/*.log fake-base-path/data/sys/log/*/*.log fake-base-
Expect(partitioner.PartitionPartitions).To(ContainElement(
boshdisk.Partition{
SizeInBytes: memSizeInBytes,
Type: boshdisk.PartitionTypeSwap,
Type: boshdisk.PartitionTypeSwap,
}),
)
Expect(partitioner.PartitionPartitions).To(ContainElement(
boshdisk.Partition{
SizeInBytes: diskSizeInBytes - memSizeInBytes,
Type: boshdisk.PartitionTypeLinux,
Type: boshdisk.PartitionTypeLinux,
}),
)
})
Expand All @@ -639,13 +639,13 @@ fake-base-path/data/sys/log/*.log fake-base-path/data/sys/log/*/*.log fake-base-
Expect(partitioner.PartitionPartitions).To(ContainElement(
boshdisk.Partition{
SizeInBytes: diskSizeInBytes / 2,
Type: boshdisk.PartitionTypeSwap,
Type: boshdisk.PartitionTypeSwap,
}),
)
Expect(partitioner.PartitionPartitions).To(ContainElement(
boshdisk.Partition{
SizeInBytes: diskSizeInBytes / 2,
Type: boshdisk.PartitionTypeLinux,
Type: boshdisk.PartitionTypeLinux,
}),
)
})
Expand Down

0 comments on commit c545856

Please sign in to comment.