test: remove unused function
Remove dead code. Co-authored-by:: Tuan Do Anh <tuanda@vn.fujitsu.com> Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
1 parent
11640f030a
commit
13686e3f8c
1 file changed
+1
-21
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user