diff options
author | Sascha Grunert <sgrunert@suse.com> | 2020-08-03 09:13:04 +0200 |
---|---|---|
committer | Sascha Grunert <sgrunert@suse.com> | 2020-08-03 09:13:04 +0200 |
commit | fef3e2da6a2024fff5142b5df80aba36e895ed73 (patch) | |
tree | 5eb2d1ec59719abd82b9114e0c30ae518e444a76 /test/e2e/run_volume_test.go | |
parent | bfd34542f463b7ea59b9560516b3b3d66674eefe (diff) | |
download | podman-fef3e2da6a2024fff5142b5df80aba36e895ed73.tar.gz podman-fef3e2da6a2024fff5142b5df80aba36e895ed73.tar.bz2 podman-fef3e2da6a2024fff5142b5df80aba36e895ed73.zip |
Remove some unnecessary []byte to string conversions
Some calls to `Sprintf("%s")` can be avoided by using direct string
type assertions.
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
Diffstat (limited to 'test/e2e/run_volume_test.go')
-rw-r--r-- | test/e2e/run_volume_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/e2e/run_volume_test.go b/test/e2e/run_volume_test.go index c729423a3..c4ee05af9 100644 --- a/test/e2e/run_volume_test.go +++ b/test/e2e/run_volume_test.go @@ -241,7 +241,7 @@ var _ = Describe("Podman run with volumes", func() { Expect(mountCmd1.ExitCode()).To(Equal(0)) os.Stdout.Sync() os.Stderr.Sync() - mountOut1 := strings.Join(strings.Fields(fmt.Sprintf("%s", mountCmd1.Out.Contents())), " ") + mountOut1 := strings.Join(strings.Fields(string(mountCmd1.Out.Contents())), " ") fmt.Printf("Output: %s", mountOut1) Expect(strings.Contains(mountOut1, volName)).To(BeFalse()) @@ -257,7 +257,7 @@ var _ = Describe("Podman run with volumes", func() { Expect(mountCmd2.ExitCode()).To(Equal(0)) os.Stdout.Sync() os.Stderr.Sync() - mountOut2 := strings.Join(strings.Fields(fmt.Sprintf("%s", mountCmd2.Out.Contents())), " ") + mountOut2 := strings.Join(strings.Fields(string(mountCmd2.Out.Contents())), " ") fmt.Printf("Output: %s", mountOut2) Expect(strings.Contains(mountOut2, volName)).To(BeTrue()) @@ -278,7 +278,7 @@ var _ = Describe("Podman run with volumes", func() { Expect(mountCmd3.ExitCode()).To(Equal(0)) os.Stdout.Sync() os.Stderr.Sync() - mountOut3 := strings.Join(strings.Fields(fmt.Sprintf("%s", mountCmd3.Out.Contents())), " ") + mountOut3 := strings.Join(strings.Fields(string(mountCmd3.Out.Contents())), " ") fmt.Printf("Output: %s", mountOut3) Expect(strings.Contains(mountOut3, volName)).To(BeFalse()) }) |