Skip to content

Commit 5dd81b6

Browse files
committed
code review updates
1 parent b9c84a0 commit 5dd81b6

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

test/extended/cli/mustgather.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
package cli
22

33
import (
4-
g "github.com/onsi/ginkgo"
5-
. "github.com/onsi/gomega"
64
"io/ioutil"
75
"os"
86
"path"
97

8+
g "github.com/onsi/ginkgo"
9+
o "github.com/onsi/gomega"
10+
1011
"github.com/openshift/origin/test/extended/util"
1112
)
1213

@@ -15,9 +16,9 @@ var _ = g.Describe("[cli] oc adm must-gather", func() {
1516
oc := util.NewCLI("oc-adm-must-gather", util.KubeConfigPath()).AsAdmin()
1617
g.It("runs successfully", func() {
1718
tempDir, err := ioutil.TempDir("", "test.oc-adm-must-gather.")
18-
Ω(err).ShouldNot(HaveOccurred())
19+
o.Expect(err).ToNot(o.HaveOccurred())
1920
defer os.RemoveAll(tempDir)
20-
Ω(oc.Run("adm", "must-gather").Args("--dest-dir", tempDir).Execute()).Should(Succeed())
21+
o.Expect(oc.Run("adm", "must-gather").Args("--dest-dir", tempDir).Execute()).To(o.Succeed())
2122

2223
expectedDirectories := [][]string{
2324
{tempDir, "cluster-scoped-resources", "config.openshift.io"},
@@ -49,15 +50,15 @@ var _ = g.Describe("[cli] oc adm must-gather", func() {
4950
}
5051

5152
for _, expectedDirectory := range expectedDirectories {
52-
Ω(path.Join(expectedDirectory...)).Should(BeADirectory())
53+
o.Expect(path.Join(expectedDirectory...)).To(o.BeADirectory())
5354
}
5455

5556
for _, expectedFile := range expectedFiles {
5657
expectedFilePath := path.Join(expectedFile...)
57-
Ω(expectedFilePath).Should(BeAnExistingFile())
58+
o.Expect(expectedFilePath).To(o.BeAnExistingFile())
5859
stat, err := os.Stat(expectedFilePath)
59-
Ω(err).ShouldNot(HaveOccurred())
60-
Ω(stat.Size()).Should(BeNumerically(">=", 100))
60+
o.Expect(err).ToNot(o.HaveOccurred())
61+
o.Expect(stat.Size()).To(o.BeNumerically(">=", 100))
6162
}
6263

6364
})

0 commit comments

Comments
 (0)