using current date in test
@@ -2,6 +2,7 @@ package variables
import (
"testing"
+ "time"
"github.com/stretchr/testify/require"
"gopkg.in/yaml.v2"
@@ -20,5 +21,6 @@ a6: 123456`
require.NoError(t, err, "could not unmarshal variables")
result := variables.Evaluate(map[string]interface{}{"hostname": "google.com"})
- require.Equal(t, map[string]interface{}{"a1": "BpLnf", "a2": "531403a4c6a4133e42d0499b5a6ee60f", "a3": "this_is_random_text", "a4": "2022-03-30", "a5": "moc.elgoog", "a6": "123456"}, result, "could not get correct elements")
+ a4 := time.Now().Format("2006-01-02")
+ require.Equal(t, map[string]interface{}{"a1": "BpLnf", "a2": "531403a4c6a4133e42d0499b5a6ee60f", "a3": "this_is_random_text", "a4": a4, "a5": "moc.elgoog", "a6": "123456"}, result, "could not get correct elements")
}
