Move tests plan from dagger dir to universe
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
26
stdlib/os/tests/container/container.cue
Normal file
26
stdlib/os/tests/container/container.cue
Normal file
@@ -0,0 +1,26 @@
|
||||
package os
|
||||
|
||||
import (
|
||||
"dagger.io/dagger"
|
||||
)
|
||||
|
||||
// Test secret mount
|
||||
SimpleSecret: {
|
||||
// 'encrypted' and 'cleartext' must be set from identical values
|
||||
encrypted: dagger.#Secret @dagger(input)
|
||||
cleartext: string @dagger(input)
|
||||
|
||||
ctr: #Container & {
|
||||
secret: "/secret-in": encrypted
|
||||
command: "cat /secret-in > /secret-out"
|
||||
}
|
||||
|
||||
// Decrypted secret
|
||||
decrypted: (#File & {
|
||||
from: ctr
|
||||
path: "/secret-out"
|
||||
}).contents @dagger(output)
|
||||
|
||||
// Assertion: decrypted value must match original cleartext
|
||||
decrypted: cleartext
|
||||
}
|
Reference in New Issue
Block a user