From 13686e3f8cde0ff4ac67d50e3d287c6ba8041112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Thu, 19 Sep 2019 11:37:14 +0200 Subject: [PATCH] test: remove unused function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove dead code. Co-authored-by:: Tuan Do Anh Signed-off-by: Sébastien Han --- .../ceph/agent/flexvolume/controller_test.go | 22 +------------------ 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/pkg/daemon/ceph/agent/flexvolume/controller_test.go b/pkg/daemon/ceph/agent/flexvolume/controller_test.go index db70612a6..91de5c89a 100644 --- a/pkg/daemon/ceph/agent/flexvolume/controller_test.go +++ b/pkg/daemon/ceph/agent/flexvolume/controller_test.go @@ -18,11 +18,6 @@ limitations under the License. package flexvolume import ( - "bytes" - "encoding/json" - "io" - "io/ioutil" - "net/http" "os" "testing" @@ -34,11 +29,10 @@ import ( "github.com/rook/rook/pkg/operator/k8sutil" "github.com/rook/rook/pkg/operator/test" "github.com/stretchr/testify/assert" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" storagev1 "k8s.io/api/storage/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" ) func TestAttach(t *testing.T) { @@ -827,20 +821,6 @@ func TestGetCRDNameFromMountDirInvalid(t *testing.T) { assert.NotNil(t, err) } -func defaultHeader() http.Header { - header := http.Header{} - header.Set("Content-Type", runtime.ContentTypeJSON) - return header -} - -func objBody(object interface{}) io.ReadCloser { - output, err := json.MarshalIndent(object, "", "") - if err != nil { - panic(err) - } - return ioutil.NopCloser(bytes.NewReader([]byte(output))) -} - func containsAttachment(attachment rookalpha.Attachment, attachments []rookalpha.Attachment) bool { for _, a := range attachments { if a.PodNamespace == attachment.PodNamespace && a.PodName == attachment.PodName && a.MountDir == attachment.MountDir && a.ReadOnly == attachment.ReadOnly && a.Node == attachment.Node {