Move tests plan from dagger dir to universe

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
Tom Chauveau
2021-06-24 21:01:17 +02:00
parent 36cf20ae2d
commit c99e39ec9c
69 changed files with 215 additions and 166 deletions

View File

@@ -1,27 +0,0 @@
package main
import (
"alpha.dagger.io/dagger"
"alpha.dagger.io/os"
)
// Test secret mount
SimpleSecret: {
// 'encrypted' and 'cleartext' must be set from identical values
encrypted: dagger.#Secret @dagger(input)
cleartext: string @dagger(input)
ctr: os.#Container & {
secret: "/secret-in": encrypted
command: "cat /secret-in > /secret-out"
}
// Decrypted secret
decrypted: (os.#File & {
from: ctr
path: "/secret-out"
}).contents @dagger(output)
// Assertion: decrypted value must match original cleartext
decrypted: cleartext
}

View File

@@ -1,5 +1,6 @@
plan:
module: .dagger/env/os-container/plan
module: ./os
package: ./tests/container
name: os-container
inputs:
SimpleSecret.cleartext:
@@ -21,8 +22,8 @@ sops:
azJIU2lIVlF4N1VxT2tVWDBPU2RsOEkKqkfxeT/mnnDxdvv/vhXMj2Zl8ogaAHa6
xbBUOaCZ8stwj4Zz4/iKdrPspQQKo7/QuxxAcFUfyuK3fULqJHPXPQ==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2021-06-23T10:38:38Z"
mac: ENC[AES256_GCM,data:tI4WNOV4Ck6mLS0inz8SpVWhReofeB1WHExTwhusFYuEFWfKqvJ5Hau1ErLhPla0JURNf2taUgRAcZC4m6ex7CjGhj5/qjtMndWrz6Vf2/6CZkFPiFUd2a19kRoiEU6Mh/3NFUPIJK04lVMvW76glxxxCkqq7bnTovPXOkumdu4=,iv:ov7MKd/4FegjBUTv2hGb1D6VjhuKK3npHXhWUFZVmns=,tag:KvESE0C2xPmuRlQ05OKO5g==,type:str]
lastmodified: "2021-06-24T18:33:56Z"
mac: ENC[AES256_GCM,data:0uCRRnDFpow8TTkSZFM5Jn8GZp6C1muLrnHvBUb5/rQ54x+G5lbgqS+rOfgFUgU1/qvKVevO0m96jfo4ZetNLnPscvK8p1oSUGBtk6iQ61tLeIQQFJR82gO2mzqVj0g0KYYeX+1QPglePimYuFy6lRGpqGEPNyxjlhq/EGhHOgU=,iv:7Lrph3Cum9H+2UuAIwCHh/wkVft2fadZ+a2F4aoCZLk=,tag:6Q60ujt3o+mvVErih2dLzg==,type:str]
pgp: []
encrypted_suffix: secret
version: 3.7.1