volumeId := "fake-volume" client.Mount(logger, "fakedriver", volumeId, map[string]interface{}{"volume_id": volumeId}) Expect(sender.GetCounter("VolmanMountErrors")).To(Equal(uint64(1))) }) }) }) Context("umount", func() { It("should be able to unmount", func() { volumeId := "fake-volume" err := client.Unmount(logger, "fakedriver", volumeId) Expect(err).NotTo(HaveOccurred()) Expect(fakeDriver.UnmountCallCount()).To(Equal(1)) Expect(fakeDriver.RemoveCallCount()).To(Equal(0)) }) It("should not be able to unmount when driver unmount fails", func() { fakeDriver.UnmountReturns(voldriver.ErrorResponse{Err: "unmount failure"}) volumeId := "fake-volume" err := client.Unmount(logger, "fakedriver", volumeId) Expect(err).To(HaveOccurred()) }) Context("with metrics", func() { var sender *fake.FakeMetricSender BeforeEach(func() { sender = fake.NewFakeMetricSender() metrics.Initialize(sender, nil)