Ejemplo n.º 1
0
				})
			})

			Context("with a password", func() {
				BeforeEach(func() {
					SSHParamsPassword = "******"
				})
				It("should setup with a username and password", func() {
					validatePlatformSetupWithPassword(platform, "fake-password")
					Expect(err).ToNot(HaveOccurred())
				})
			})

			Context("with a host public key available", func() {
				It("should return SSH Result with HostPublicKey", func() {
					hostPublicKey, _ := platform.GetHostPublicKey()
					Expect(response).To(Equal(SSHResult{
						Command:       "setup",
						Status:        "success",
						IP:            defaultIP,
						HostPublicKey: hostPublicKey,
					}))
					Expect(err).To(BeNil())

				})
			})

			Context("without a host public key available", func() {
				BeforeEach(func() {
					platformPublicKeyErr = errors.New("Get Host Public Key Failure")
				})