@@ -29,6 +29,7 @@ var _ = Describe("Snapshot enable", func() {
2929 cliCommand = block .NewSnapshotEnableCommand (slCommand )
3030 cliCommand .Command .PersistentFlags ().Var (cliCommand .OutputFlag , "output" , "--output=JSON for json output." )
3131 cliCommand .StorageManager = FakeStorageManager
32+ FakeStorageManager .GetVolumeIdReturns (1234 , nil )
3233 })
3334
3435 Describe ("Snapshot enable" , func () {
@@ -38,11 +39,6 @@ var _ = Describe("Snapshot enable", func() {
3839 Expect (err ).To (HaveOccurred ())
3940 Expect (err .Error ()).To (ContainSubstring ("Incorrect Usage: This command requires one argument" ))
4041 })
41- It ("Bad Volume ID" , func () {
42- err := testhelpers .RunCobraCommand (cliCommand .Command , "a1234" , "-c=100" , "-s=INTERVAL" )
43- Expect (err ).To (HaveOccurred ())
44- Expect (err .Error ()).To (ContainSubstring ("Invalid input for 'Volume ID'. It must be a positive integer." ))
45- })
4642 It ("Bad Interval" , func () {
4743 err := testhelpers .RunCobraCommand (cliCommand .Command , "1234" , "--schedule-type=FAKE" , "-c=100" )
4844 Expect (err ).To (HaveOccurred ())
@@ -80,9 +76,9 @@ var _ = Describe("Snapshot enable", func() {
8076 Expect (fakeUI .Outputs ()).To (ContainSubstring ("HOURLY snapshots have been enabled for volume 1234." ))
8177 })
8278 It ("Happy Path min Options" , func () {
83- err := testhelpers .RunCobraCommand (cliCommand .Command , "9999 " , "-s" , "INTERVAL" , "-c" , "500" )
79+ err := testhelpers .RunCobraCommand (cliCommand .Command , "1234 " , "-s" , "INTERVAL" , "-c" , "500" )
8480 Expect (err ).NotTo (HaveOccurred ())
85- Expect (fakeUI .Outputs ()).To (ContainSubstring ("INTERVAL snapshots have been enabled for volume 9999 ." ))
81+ Expect (fakeUI .Outputs ()).To (ContainSubstring ("INTERVAL snapshots have been enabled for volume 1234 ." ))
8682 })
8783 })
8884
0 commit comments