Exemplo n.º 1
0
				defaultIP = "ww.xx.yy.zz"

				platformPublicKeyValue = ""
				platformPublicKeyErr = nil
			})

			JustBeforeEach(func() {
				settingsService := &fakesettings.FakeSettingsService{}
				settingsService.Settings.Networks = boshsettings.Networks{
					"fake-net": boshsettings.Network{IP: defaultIP},
				}

				platform, action = buildSSHAction(settingsService)

				platform.GetHostPublicKeyValue = platformPublicKeyValue
				platform.GetHostPublicKeyError = platformPublicKeyErr

				params = SSHParams{
					User:      "******",
					PublicKey: "fake-public-key",
					Password:  SSHParamsPassword,
				}

				response, err = action.Run("setup", params)
			})

			Context("without default ip", func() {
				BeforeEach(func() {
					defaultIP = ""
				})
				It("should return an error", func() {