What is the recommended way to ingest config for t...
# golang
f
What is the recommended way to ingest config for tests? I see that most of the examples online and in the official docs are hardcoded like below.
Copy code
func TestInfrastructure(t *testing.T) {
	cwd, err := os.Getwd()
	if err != nil {
		t.FailNow()
	}
    
    //  This gives an invalid memory address error!!!! 
    //	conf := config.New(ctx, "aep")
	//  conf.RequireObject("config", &InternalConfig)

	test := integration.ProgramTestOptions{
		DestroyOnCleanup: true,
		Quick:            true,
		SkipRefresh:      true,
		Verbose:          true,
		Dir:              path.Join(cwd, "..", ".."),
		// There seems to an issue with ingesting config from the stack yaml file using
		// the Pulumi helper.ConfInit function. All the examples that I see on their site are hardcoded too.
		Config: map[string]string{
			"aws:region":  "us-east-1",
			"aws:profile": "sandbox",
.
.
.
I tried using the RequireObject method to get the config from the stack yaml file and it failed with an
invalid memory address or nil pointer dereference
.