func TestAgentConfigYamlEnc(t *testing.T) {
	secretScriptBuilder.Do(func() { require.NoError(t, setupSecretScript()) })

	config.Datadog = config.NewConfig("datadog", "DD", strings.NewReplacer(".", "_"))
	defer restoreGlobalConfig()
	// Secrets settings are initialized only once by initConfig in the agent package so we have to setup them
	config.Datadog.Set("secret_backend_timeout", 15)
	config.Datadog.Set("secret_backend_output_max_size", 1024)

	assert := assert.New(t)

	agentConfig, err := NewAgentConfig(
		"test",
		"./testdata/TestDDAgentConfigYamlEnc.yaml",
		"",
	)
	assert.NoError(err)

	ep := agentConfig.APIEndpoints[0]
	assert.Equal("secret-my_api_key", ep.APIKey)
}
// TestAgentConfigYamlEnc tests the secrets feature on the file TestDDAgentConfigYamlEnc
TestAgentConfigYamlEnc tests the secrets feature on the file TestDDAgentConfigYamlEnc
// TestAgentConfigYamlEnc tests the secrets feature on the file TestDDAgentConfigYamlEnc
func TestAgentConfigYamlEnc(t *testing.T) {
	secretScriptBuilder.Do(func() { require.NoError(t, setupSecretScript()) })
	config.Datadog = config.NewConfig("datadog", "DD", strings.NewReplacer(".", "_"))
	defer restoreGlobalConfig()
	config.Datadog.Set("secret_backend_timeout", 15)
	config.Datadog.Set("secret_backend_output_max_size", 1024)
	assert := assert.New(t)
	agentConfig, err := NewAgentConfig(
		"test",
		"./testdata/TestDDAgentConfigYamlEnc.yaml",
		"",
	)
	assert.NoError(err)
	ep := agentConfig.APIEndpoints[0]
	assert.Equal("secret-my_api_key", ep.APIKey)
}
func TestAgentConfigYamlEnc ( t * testing . T ) { secretScriptBuilder . Do ( func ( ) { require . NoError ( t , setupSecretScript ( ) ) } ) config . Datadog = config . NewConfig ( " " , " " , strings . NewReplacer ( " " , " " ) ) defer restoreGlobalConfig ( ) config . Datadog . Set ( " " , 15 ) config . Datadog . Set ( " " , 1024 ) assert := assert . New ( t ) agentConfig , err := NewAgentConfig ( " " , " " , " " , ) assert . NoError ( err ) ep := agentConfig . APIEndpoints [ 0 ] assert . Equal ( " " , ep . APIKey ) }
TestAgentConfigYamlEnc tests the secrets feature on the file TestDDAgentConfigYamlEnc
TestAgentConfigYamlEnc tests the secrets feature on the file TestDDAgentConfigYamlEnc
// Secrets settings are initialized only once by initConfig in the agent package so we have to setup them