From 434d1d2bd6f7a6f85516c45b8ac54c384629da29 Mon Sep 17 00:00:00 2001 From: Victoria Henry Date: Mon, 8 Oct 2018 10:05:14 -0400 Subject: [PATCH] Unfocusing test; removed unnecessary test [#160565578] Signed-off-by: Mark DeLillo --- credhub/permissions_test.go | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/credhub/permissions_test.go b/credhub/permissions_test.go index ac40fafb..18629b37 100644 --- a/credhub/permissions_test.go +++ b/credhub/permissions_test.go @@ -16,7 +16,7 @@ import ( var _ = Describe("Permissions", func() { Context("GetPermission", func() { Context("when server version is less than 2.0.0", func() { - FIt("returns permission using V1 endpoint", func() { + It("returns permission using V1 endpoint", func() { responseString := `{ "credential_name":"/test-password", @@ -83,40 +83,6 @@ var _ = Describe("Permissions", func() { Expect(dummyAuth.Request.Method).To(Equal(http.MethodGet)) }) }) - - Context("when server version is not specified", func() { - var server *ghttp.Server - - BeforeEach(func() { - server = ghttp.NewServer() - server.AppendHandlers( - ghttp.CombineHandlers( - ghttp.VerifyRequest("GET", "/info"), - ghttp.RespondWith(http.StatusOK, `{}`), - ), - ghttp.CombineHandlers( - ghttp.VerifyRequest("GET", "/version"), - ghttp.RespondWith(http.StatusOK, `{"version": "1.9.0"}`), - ), - ghttp.CombineHandlers( - ghttp.VerifyRequest("GET", "/api/v1/permissions"), - ghttp.RespondWith(http.StatusOK, `{}`), - ), - ) - }) - - AfterEach(func() { - //shut down the server between tests - server.Close() - }) - - It("returns permission", func() { - ch, _ := New(server.URL()) - _, err := ch.GetPermission("name") - Expect(err).NotTo(HaveOccurred()) - Expect(server.ReceivedRequests()).To(HaveLen(3)) - }) - }) }) Context("AddPermission", func() { @@ -224,4 +190,3 @@ var _ = Describe("Permissions", func() { }) }) }) -