VirtusLab / besom

Besom - a Pulumi SDK for Scala. Also, incidentally, a broom made of twigs tied round a stick. Brooms and besoms are used for protection, to ward off evil spirits, and cleansing of ritual spaces.
https://virtuslab.github.io/besom/
Apache License 2.0
123 stars 7 forks source link

`ProviderArgsEncoder` does not preserve "secretness" #390

Closed pawelprazak closed 6 months ago

pawelprazak commented 7 months ago

This test fails:

test("encode secret ProviderArgs".ignore) {
    given Context = DummyContext().unsafeRunSync()
    val pae       = summon[ProviderArgsEncoder[ProviderArgs]]

    val args         = ProviderArgs(kubeconfig = Output.secret("abcd"))
    val (_, encoded) = pae.encode(args, _ => false).unsafeRunSync()

    val expected = Map("kubeconfig" -> "abcd".asValue.asSecret).asValue

    assertNoDiff(pprint(encoded.asValue).plainText, pprint(expected).plainText)
    assertEqualsValue(encoded.asValue, expected)
  }

The secret was not preserved.

pawelprazak commented 6 months ago

fixed by #414