func (h *Harness) initTempPath() (err error) {
	if h.tempPath == "" {
		h.tempPath, err = ioutil.TempDir("", "kuttl")
		h.T.Log("temp folder created", h.tempPath)
	}
	return err
}
initTempPath creates the temp folder if needed.
various parts of system may need it, starting with kind, or working with tar test suites
package test
import (
	"bytes"
	"context"
	"errors"
	"fmt"
	"io/ioutil"
	"math/rand"
	"os"
	"os/exec"
	"os/signal"
	"path/filepath"
	"strings"
	"sync"
	"testing"
	"time"
	volumetypes "github.com/docker/docker/api/types/volume"
	docker "github.com/docker/docker/client"
	"gopkg.in/yaml.v2"
	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/client-go/discovery"
	"k8s.io/client-go/rest"
	"k8s.io/client-go/tools/clientcmd"
	"sigs.k8s.io/controller-runtime/pkg/client"
	"sigs.k8s.io/controller-runtime/pkg/client/config"
	"sigs.k8s.io/controller-runtime/pkg/envtest"
	kindConfig "sigs.k8s.io/kind/pkg/apis/config/v1alpha4"
	harness "github.com/kudobuilder/kuttl/pkg/apis/testharness/v1beta1"
	"github.com/kudobuilder/kuttl/pkg/file"
	"github.com/kudobuilder/kuttl/pkg/http"
	"github.com/kudobuilder/kuttl/pkg/report"
	testutils "github.com/kudobuilder/kuttl/pkg/test/utils"
)
type Harness struct {
	TestSuite harness.TestSuite
	T         *testing.T
	logger        testutils.Logger
	managerStopCh chan struct{}
	config        *rest.Config
	docker        testutils.DockerClient
	client        client.Client
	dclient       discovery.DiscoveryInterface
	env           *envtest.Environment
	kind          *kind
	tempPath      string
	clientLock    sync.Mutex
	configLock    sync.Mutex
	stopping      bool
	bgProcesses   []*exec.Cmd
	report        *report.Testsuites
}
func (h *Harness) LoadTests(dir string) ([]*Case, error) {
	dir, err := filepath.Abs(dir)
	if err != nil {
		return nil, err
	}
	files, err := ioutil.ReadDir(dir)
	if err != nil {
		return nil, err
	}
	var tests []*Case
	timeout := h.GetTimeout()
	h.T.Logf("going to run test suite with timeout of %d seconds for each step", timeout)
	for _, file := range files {
		if !file.IsDir() {
			continue
		}
		tests = append(tests, &Case{
			Timeout:            timeout,
			Steps:              []*Step{},
			Name:               file.Name(),
			PreferredNamespace: h.TestSuite.Namespace,
			Dir:                filepath.Join(dir, file.Name()),
			SkipDelete:         h.TestSuite.SkipDelete,
			Suppress:           h.TestSuite.Suppress,
		})
	}
	return tests, nil
}
func (h *Harness) GetLogger() testutils.Logger {
	if h.logger == nil {
		h.logger = testutils.NewTestLogger(h.T, "")
	}
	return h.logger
}
func (h *Harness) GetTimeout() int {
	timeout := 30
	if h.TestSuite.Timeout != 0 {
		timeout = h.TestSuite.Timeout
	}
	return timeout
}
func (h *Harness) RunKIND() (*rest.Config, error) {
	if h.kind == nil {
		var err error
		err = h.initTempPath()
		if err != nil {
			return nil, err
		}
		kind := newKind(h.TestSuite.KINDContext, h.kubeconfigPath(), h.GetLogger())
		h.kind = &kind
		if h.kind.IsRunning() {
			h.kind = nil
			msg := "KIND is already running, unable to start"
			h.T.Log(msg)
			return nil, errors.New(msg)
		}
		kindCfg := &kindConfig.Cluster{}
		if h.TestSuite.KINDConfig != "" {
			h.T.Logf("Loading KIND config from %s", h.TestSuite.KINDConfig)
			var err error
			kindCfg, err = h.loadKindConfig(h.TestSuite.KINDConfig)
			if err != nil {
				return nil, err
			}
		}
		dockerClient, err := h.DockerClient()
		if err != nil {
			return nil, err
		}
		dockerClient.NegotiateAPIVersion(context.TODO())
		h.addNodeCaches(dockerClient, kindCfg)
		h.T.Log("Starting KIND cluster")
		if err := h.kind.Run(kindCfg); err != nil {
			return nil, err
		}
		if err := h.kind.AddContainers(dockerClient, h.TestSuite.KINDContainers, h.T); err != nil {
			return nil, err
		}
	}
	return clientcmd.BuildConfigFromFlags("", h.kubeconfigPath())
}