Move universe integration tests to universe dir.
Signed-off-by: Solomon Hykes <solomon@dagger.io>
This commit is contained in:
2
stdlib/.dagger/env/aws-s3/.gitignore
vendored
Normal file
2
stdlib/.dagger/env/aws-s3/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# dagger state
|
||||
state/**
|
71
stdlib/.dagger/env/aws-s3/plan/s3.cue
vendored
Normal file
71
stdlib/.dagger/env/aws-s3/plan/s3.cue
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
package s3
|
||||
|
||||
import (
|
||||
"dagger.io/dagger"
|
||||
"dagger.io/aws"
|
||||
"dagger.io/aws/s3"
|
||||
)
|
||||
|
||||
TestConfig: awsConfig: aws.#Config & {
|
||||
region: "us-east-2"
|
||||
}
|
||||
|
||||
bucket: "dagger-ci"
|
||||
|
||||
content: "A simple test sentence"
|
||||
|
||||
TestS3UploadFile: {
|
||||
deploy: s3.#Put & {
|
||||
config: TestConfig.awsConfig
|
||||
sourceInline: content
|
||||
target: "s3://\(bucket)/test.txt"
|
||||
}
|
||||
|
||||
verify: #VerifyS3 & {
|
||||
config: TestConfig.awsConfig
|
||||
target: deploy.target
|
||||
file: "test.txt"
|
||||
}
|
||||
}
|
||||
|
||||
TestDirectory: dagger.#Artifact
|
||||
|
||||
TestS3UploadDir: {
|
||||
deploy: s3.#Put & {
|
||||
config: TestConfig.awsConfig
|
||||
source: TestDirectory
|
||||
target: "s3://\(bucket)/"
|
||||
}
|
||||
|
||||
verifyFile: #VerifyS3 & {
|
||||
config: TestConfig.awsConfig
|
||||
target: deploy.target
|
||||
file: "dirFile.txt"
|
||||
}
|
||||
|
||||
verifyDir: #VerifyS3 & {
|
||||
config: TestConfig.awsConfig
|
||||
target: deploy.target
|
||||
file: "foo.txt"
|
||||
}
|
||||
}
|
||||
|
||||
TestS3Sync: {
|
||||
deploy: s3.#Sync & {
|
||||
config: TestConfig.awsConfig
|
||||
source: TestDirectory
|
||||
target: "s3://\(bucket)/"
|
||||
}
|
||||
|
||||
verifyFile: #VerifyS3 & {
|
||||
config: TestConfig.awsConfig
|
||||
target: deploy.target
|
||||
file: "dirFile.txt"
|
||||
}
|
||||
|
||||
verifyDir: #VerifyS3 & {
|
||||
config: TestConfig.awsConfig
|
||||
target: deploy.target
|
||||
file: "foo.txt"
|
||||
}
|
||||
}
|
83
stdlib/.dagger/env/aws-s3/plan/verify.cue
vendored
Normal file
83
stdlib/.dagger/env/aws-s3/plan/verify.cue
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
package s3
|
||||
|
||||
import (
|
||||
"dagger.io/aws"
|
||||
"dagger.io/alpine"
|
||||
"dagger.io/dagger/op"
|
||||
)
|
||||
|
||||
#List: {
|
||||
// AWS Config
|
||||
config: aws.#Config
|
||||
|
||||
// Target S3 URL (e.g. s3://<bucket-name>/<path>/<sub-path>)
|
||||
target?: string
|
||||
|
||||
contents: {
|
||||
string
|
||||
|
||||
#up: [
|
||||
op.#Load & {
|
||||
from: aws.#CLI & {
|
||||
"config": config
|
||||
}
|
||||
},
|
||||
|
||||
op.#Exec & {
|
||||
args: [
|
||||
"/bin/bash",
|
||||
"--noprofile",
|
||||
"--norc",
|
||||
"-eo",
|
||||
"pipefail",
|
||||
"-c",
|
||||
#"""
|
||||
aws s3 ls --recursive \#(target) > /contents
|
||||
"""#,
|
||||
]
|
||||
},
|
||||
|
||||
op.#Export & {
|
||||
source: "/contents"
|
||||
format: "string"
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
#VerifyS3: {
|
||||
file: string
|
||||
config: aws.#Config
|
||||
target: string
|
||||
|
||||
lists: #List & {
|
||||
"config": config
|
||||
"target": target
|
||||
}
|
||||
|
||||
test: #up: [
|
||||
op.#Load & {
|
||||
from: alpine.#Image & {
|
||||
package: bash: "~5.1"
|
||||
}
|
||||
},
|
||||
|
||||
op.#WriteFile & {
|
||||
dest: "/test"
|
||||
content: lists.contents
|
||||
},
|
||||
|
||||
op.#Exec & {
|
||||
always: true
|
||||
args: [
|
||||
"/bin/bash",
|
||||
"--noprofile",
|
||||
"--norc",
|
||||
"-eo",
|
||||
"pipefail",
|
||||
"-c",
|
||||
"grep -q \(file) /test",
|
||||
]
|
||||
},
|
||||
]
|
||||
}
|
29
stdlib/.dagger/env/aws-s3/values.yaml
vendored
Normal file
29
stdlib/.dagger/env/aws-s3/values.yaml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: aws-s3
|
||||
inputs:
|
||||
TestConfig.awsConfig.accessKey:
|
||||
secret: ENC[AES256_GCM,data:iu6LfQNgGZUVnHVeMRYPrcBtlZk=,iv:U5PLxDKXwJnUDdk1ayFGvvJfWdVqh1PK5ujb20YYPP0=,tag:QyqIJRiR6nE16ZDV0CP7Pw==,type:str]
|
||||
TestConfig.awsConfig.secretKey:
|
||||
secret: ENC[AES256_GCM,data:Q/W+KH3NEouGt6C5S+KiC43837soYi2Mjb/z5K8rD9gtaNaBjjkJHg==,iv:8nGEzLXd91rF5YBZ/EdQoMN27yrpc0sgm26DEvIuSHM=,tag:/oyKl/vj5MJAm+jZMOOAuQ==,type:str]
|
||||
TestDirectory:
|
||||
dir:
|
||||
path: ./aws/s3/testdata
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBKeEk5MS9nVmFoOVNNOHdE
|
||||
WnZCTXBWbW9LL1NJYndCYjhIM2JsNXNEUmxJCkUya0dlZjZ0dGRIM1pVdzg5eWFH
|
||||
MVpiaE9PclNudGdUZm5FcytuVDZGTDAKLS0tIEQxWDdteHgzS3JkdmtNTVpxMUh1
|
||||
aXlvVWJVSGNTSkVyYmpZbi9nUVJZdmMK6csXZ2RMxFw5DB+Hb2TyhyoZT8c2/z7Y
|
||||
Lc9Pe8gb8aUq5Ha+wCybYvY6JWEM5A9XYJKbE7f4borTfGKS72d6pw==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2021-06-09T19:30:57Z"
|
||||
mac: ENC[AES256_GCM,data:kIT54J5QImmFYIgQvj6kDkWLa+7kWNN5yhN+A+2qwofJsLdbIrPrihd59mi+RPlRgO0gzePEqEsGfoNpQBMvfXZDAPDiHAv0xKiGLnkQLX1N9PxoSNvORzqk3SAHJPlfVIbVAmGEp4Oy09I0Qi43xvvISsYXtlsiMp0Zm/QfYFY=,iv:l902awO6UvpJIPogIKeOfsMgGL2Ivp4KFQ/1jef/+kU=,tag:yP0oPIwfReNU4gCIeUTwaQ==,type:str]
|
||||
pgp: []
|
||||
encrypted_suffix: secret
|
||||
version: 3.7.1
|
Reference in New Issue
Block a user