コード例 #1
0
				BeforeEach(func() {
					delete(desiredLRPResponse.Routes, routes.DIEGO_SSH)
					receptorClient.GetDesiredLRPReturns(desiredLRPResponse, nil)
				})

				It("fails the authentication", func() {
					Expect(authErr).To(Equal(authenticators.RouteNotFoundErr))
				})
			})

			Context("when the ssh route fails to unmarshal", func() {
				BeforeEach(func() {
					message := json.RawMessage([]byte(`{,:`))
					desiredLRPResponse.Routes[routes.DIEGO_SSH] = &message
					receptorClient.GetDesiredLRPReturns(desiredLRPResponse, nil)
				})

				It("fails the authentication", func() {
					Expect(authErr).To(HaveOccurred())
				})
			})
		})
	})

	Describe("Realm", func() {
		It("is diego", func() {
			Expect(authenticator.Realm()).To(Equal("diego"))
		})
	})
})