VolumeID:       "2",
			Path:           "/dev/sdf",
			FileSystemType: "ext4",
		}
	})

	It("is asynchronous", func() {
		Expect(action.IsAsynchronous()).To(BeTrue())
	})

	It("is not persistent", func() {
		Expect(action.IsPersistent()).To(BeFalse())
	})

	It("unmount disk when the disk is mounted", func() {
		platform.UnmountPersistentDiskDidUnmount = true

		result, err := action.Run("vol-123")
		Expect(err).ToNot(HaveOccurred())
		boshassert.MatchesJSONString(GinkgoT(), result, `{"message":"Unmounted partition of {ID:vol-123 DeviceID: VolumeID:2 Path:/dev/sdf FileSystemType:ext4}"}`)

		Expect(platform.UnmountPersistentDiskSettings).To(Equal(expectedDiskSettings))
	})

	It("unmount disk when the disk is not mounted", func() {
		platform.UnmountPersistentDiskDidUnmount = false

		result, err := action.Run("vol-123")
		Expect(err).ToNot(HaveOccurred())
		boshassert.MatchesJSONString(GinkgoT(), result, `{"message":"Partition of {ID:vol-123 DeviceID: VolumeID:2 Path:/dev/sdf FileSystemType:ext4} is not mounted"}`)