func (s *TestSuite) Run(
	targetChart *chart.Chart,
	snapshotCache *snapshot.Cache,
	result *TestSuiteResult,
) *TestSuiteResult {
	s.polishTestJobsPathInfo()
	result.DisplayName = s.Name
	result.FilePath = s.definitionFile
	preparedChart, err := s.prepareChart(targetChart)
	if err != nil {
		result.ExecError = err
		return result
	}
	result.Passed, result.TestsResult = s.runTestJobs(
		preparedChart,
		snapshotCache,
	)
	result.countSnapshot(snapshotCache)
	return result
}
Run runs all the test jobs defined in TestSuite
package unittest
import (
	"fmt"
	"io/ioutil"
	"os"
	"path"
	"path/filepath"
	"strings"
	"github.com/lrills/helm-unittest/unittest/snapshot"
	"gopkg.in/yaml.v2"
	"k8s.io/helm/pkg/proto/hapi/chart"
)
func ParseTestSuiteFile(suiteFilePath, chartRoute string) (*TestSuite, error) {
	suite := TestSuite{chartRoute: chartRoute}
	content, err := ioutil.ReadFile(suiteFilePath)
	if err != nil {
		return &suite, err
	}
	cwd, _ := os.Getwd()
	absPath, _ := filepath.Abs(suiteFilePath)
	suite.definitionFile, err = filepath.Rel(cwd, absPath)
	if err != nil {
		return &suite, err
	}
	if err := yaml.Unmarshal(content, &suite); err != nil {
		return &suite, err
	}
	return &suite, nil
}
type TestSuite struct {
	Name      string `yaml:"suite"`
	Templates []string
	Tests     []*TestJob
	definitionFile string
	chartRoute string
}