nit: method name change

This commit is contained in:
Maidul Islam
2023-02-24 22:21:20 -05:00
parent 4a72d725b1
commit 5614b0f58a
2 changed files with 4 additions and 4 deletions

View File

@@ -6,7 +6,7 @@ import (
"github.com/Infisical/infisical-merge/packages/models"
)
func TestEnvFilter(t *testing.T) {
func TestFilterReservedEnvVars(t *testing.T) {
// some test env vars.
// HOME and PATH are reserved key words and should be filtered out
@@ -22,7 +22,7 @@ func TestEnvFilter(t *testing.T) {
}
// check to see if there are any reserved key words in secrets to inject
filterEnvVars(env)
filterReservedEnvVars(env)
if len(env) != 2 {
t.Errorf("Expected 2 secrets to be returned, got %d", len(env))

View File

@@ -110,7 +110,7 @@ var runCmd = &cobra.Command{
}
// check to see if there are any reserved key words in secrets to inject
filterEnvVars(secretsByKey)
filterReservedEnvVars(secretsByKey)
// now add infisical secrets
for k, v := range secretsByKey {
@@ -156,7 +156,7 @@ var (
}
)
func filterEnvVars(env map[string]models.SingleEnvironmentVariable) {
func filterReservedEnvVars(env map[string]models.SingleEnvironmentVariable) {
for _, reservedEnvName := range reservedEnvVars {
if _, ok := env[reservedEnvName]; ok {
delete(env, reservedEnvName)