test: implemented tests for input list

Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
Sam Alba
2021-05-26 12:00:59 +02:00
parent 6568c4e6d1
commit 42e91c0a30
2 changed files with 77 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
package main
import (
"dagger.io/dagger"
"dagger.io/aws"
)
awsConfig: aws.#Config & {
// force region
region: "us-east-1"
}
#A: {
// source dir
source: dagger.#Artifact @dagger(input)
sourceNotInput: dagger.#Artifact
// a secret
key: dagger.#Secret @dagger(input)
keyNotInput: dagger.#Secret
// a string
str: string @dagger(input)
strSet: "pipo" @dagger(input)
strDef: *"yolo" | string @dagger(input)
// a number
num: int | *42 @dagger(input)
numNotInput: int
// aws config
cfg: awsConfig
}
cfgInline: {
#A
}
cfg: #A & {
// force this key
num: 21
}
cfg2: cfg