Ejemplo n.º 1
0
func init() {
	Describe("Testing with Ginkgo", func() {
		It("migrate disk should be asynchronous", func() {
			_, action := buildMigrateDiskAction()
			Expect(action.IsAsynchronous()).To(BeTrue())
		})

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

		It("migrate disk action run", func() {

			platform, action := buildMigrateDiskAction()

			value, err := action.Run()
			Expect(err).ToNot(HaveOccurred())
			boshassert.MatchesJSONString(GinkgoT(), value, "{}")

			Expect(platform.MigratePersistentDiskFromMountPoint).To(Equal("/foo/store"))
			Expect(platform.MigratePersistentDiskToMountPoint).To(Equal("/foo/store_migration_target"))
		})
	})
}
Ejemplo n.º 2
0
func init() {
	Describe("Ping", func() {
		It("is synchronous", func() {
			action := NewPing()
			Expect(action.IsAsynchronous()).To(BeFalse())
		})

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

		It("ping run returns pong", func() {
			action := NewPing()
			pong, err := action.Run()
			Expect(err).ToNot(HaveOccurred())
			Expect(pong).To(Equal("pong"))
		})
	})
}