INNER CODE UNIT · Go

runTest

transcend-io/terragrunt-atlantis-config · cmd/generate_test.go:54

func runTest(t *testing.T, goldenFile string, args []string) {
	err := resetForRun()
	if err != nil {
		t.Error("Failed to reset default flags")
		return
	}

	randomInt := rand.Int()
	filename := filepath.Join("test_artifacts", fmt.Sprintf("%d.yaml", randomInt))
	defer os.Remove(filename)

	allArgs := append([]string{
		"generate",
		"--output",
		filename,
	}, args...)

	contentBytes, err := RunWithFlags(filename, allArgs)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…