(t *testing.T)
| 291 | } |
| 292 | |
| 293 | func 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 | } |
| 325 | func TestActionsInputDependenciesToActionDependencies(t *testing.T) { |
| 326 | t.Run("it should map input dependencies to action payload", func(t *testing.T) { |
| 327 | input := map[string]string{ |
nothing calls this directly
no test coverage detected