5b7b1cab79
- Refactored to keep every transformation of built-in types (e.g. FS, Secret, etc) to/from CUE in the same place (plancontext) - dagger.#Service and dagger.#Secret are now following the new FS-like format (e.g. `_service: id: string`) - Backward compatibility - dagger.#Stream is now an alias for dagger.#Service Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
17 lines
288 B
Go
17 lines
288 B
Go
package plancontext
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestContext(t *testing.T) {
|
|
ctx := New()
|
|
|
|
secret := ctx.Secrets.New("test")
|
|
get, err := ctx.Secrets.FromValue(secret.Value())
|
|
require.NoError(t, err)
|
|
require.Equal(t, "test", get.PlainText())
|
|
}
|