Esempio n. 1
0
// FakeUpdate add testdata to home path
func FakeUpdate(home string) {
	util.EnsureHome(home)

	ioutil.WriteFile(filepath.Join(home, util.Configfile), []byte(tmpConfigfile), 0755)

	// absolute path to testdata charts
	testChartsPath := filepath.Join(HelmRoot, "testdata/charts")

	// copy testdata charts into cache
	// mock git clone
	util.CopyDir(testChartsPath, filepath.Join(home, "cache/charts"))
}
Esempio n. 2
0
// CheckLocalPrereqs makes sure we have all the tools we need to work with
// charts locally
func CheckLocalPrereqs(home string) {
	helm.EnsureHome(home)
	ensureCommand("git")
}
Esempio n. 3
0
func TestEnsureHome(t *testing.T) {
	tmpHome := test.CreateTmpHome()
	util.EnsureHome(tmpHome)
}