MCPcopy Create free account
hub / github.com/auth0/auth0-cli / TestActionsInputSecretsToActionSecrets

Function TestActionsInputSecretsToActionSecrets

internal/cli/actions_test.go:293–324  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

291}
292
293func TestActionsInputSecretsToActionSecrets(t *testing.T) {
294 t.Run("it should map input secrets to action payload", func(t *testing.T) {
295 input := map[string]string{
296 "secret1": "value1",
297 "secret2": "value2",
298 "secret3": "value3",
299 }
300 res := inputSecretsToActionSecrets(input)
301
302 assert.Len(t, *res, 3)
303 assert.Contains(t, *res, management.ActionSecret{
304 Name: auth0.String("secret1"),
305 Value: auth0.String("value1"),
306 })
307 assert.Contains(t, *res, management.ActionSecret{
308 Name: auth0.String("secret2"),
309 Value: auth0.String("value2"),
310 })
311 assert.Contains(t, *res, management.ActionSecret{
312 Name: auth0.String("secret3"),
313 Value: auth0.String("value3"),
314 })
315 })
316
317 t.Run("it should handle empty input secrets", func(t *testing.T) {
318 emptyInput := map[string]string{}
319 res := inputSecretsToActionSecrets(emptyInput)
320 expected := []management.ActionSecret{}
321 assert.Len(t, *res, 0)
322 assert.Equal(t, res, &expected)
323 })
324}
325func TestActionsInputDependenciesToActionDependencies(t *testing.T) {
326 t.Run("it should map input dependencies to action payload", func(t *testing.T) {
327 input := map[string]string{

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected