Move private repository tests + implement env helper function
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
This commit is contained in:
parent
a987d1dc34
commit
3b0e3f6919
@ -8,11 +8,6 @@ setup() {
|
||||
dagger -e sanity-check up
|
||||
}
|
||||
|
||||
@test "op-fetch-git" {
|
||||
# This test should be in `tests/ops.bats` but dagger compute doesn't handle `dagger.#Secret`
|
||||
dagger -e op-fetch-git up
|
||||
}
|
||||
|
||||
@test "os" {
|
||||
dagger -e os up
|
||||
}
|
||||
|
@ -26,6 +26,13 @@ dagger_new_with_plan() {
|
||||
"$DAGGER" new "$name"
|
||||
}
|
||||
|
||||
dagger_new_with_env() {
|
||||
local sourcePlan="$1"
|
||||
|
||||
"$DAGGER" init -w "$DAGGER_WORKSPACE"
|
||||
rsync -av "$sourcePlan"/ "$DAGGER_WORKSPACE"
|
||||
}
|
||||
|
||||
# dagger helper to execute the right binary
|
||||
dagger() {
|
||||
"${DAGGER}" "$@"
|
||||
|
@ -108,6 +108,10 @@ setup() {
|
||||
run "$DAGGER" compute "$TESTDIR"/ops/fetch-git/gitdir
|
||||
assert_success
|
||||
|
||||
dagger_new_with_env "$TESTDIR"/ops/fetch-git/private-repo
|
||||
run "$DAGGER" up -e op-fetch-git
|
||||
assert_success
|
||||
|
||||
# FIXME: distinguish missing inputs from incorrect config
|
||||
# run "$DAGGER" compute "$TESTDIR"/ops/fetch-git/invalid
|
||||
# assert_failure
|
||||
|
2
tests/ops/fetch-git/private-repo/.dagger/env/op-fetch-git/.gitignore
vendored
Normal file
2
tests/ops/fetch-git/private-repo/.dagger/env/op-fetch-git/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
# dagger state
|
||||
state/**
|
26
tests/ops/fetch-git/private-repo/.dagger/env/op-fetch-git/values.yaml
vendored
Normal file
26
tests/ops/fetch-git/private-repo/.dagger/env/op-fetch-git/values.yaml
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
plan:
|
||||
package: .
|
||||
name: op-fetch-git
|
||||
inputs:
|
||||
TestPAT:
|
||||
secret: ENC[AES256_GCM,data:TVMwgMe+Q/BzQ/rxKIr9lRPuu2FpVQXppufy33lWQ8An+c9cTSVLCQ==,iv:Xpe54Llfcu1aTWkzNxUtcRrrqIlI/i4pdshOCVKeREY=,tag:Ugwzcpmddzhq62gPKpAkkQ==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBoamxhWnpyQzJRcE9TRldj
|
||||
Rmd6eHV5TnpReENzNHI3MFZRZWpqaGJoRzFjClMyQW1raVNiSU84blhhSzRja01F
|
||||
cjVpVmxJS1o0NEdlTXYvQ290Rjdma0kKLS0tIDkrTjRHTEtaaDY2QzhBaVJYRjhn
|
||||
OXA2TkFjYlVNMFFEblA2MUZRWVB3T3MKhunM53KD+jGvdAInPbr+N6YrpirLIp4V
|
||||
seb6c4bryHPL+zZWSX1H04sCWgGOypLfYq/fUyPOunbs/b+AWn8chw==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2021-08-26T09:34:51Z"
|
||||
mac: ENC[AES256_GCM,data:JUo5COutVZMqJN2UNhqL842hhGsMdCLOFFo5g4HDFMQLG3M1iQ2M0i8AjnAlPGMukNoF3qr/rTf6FCNdpeXc/oXiOM+q0w9xp+jGup5uplhXUWw+au4YHXbSezxCVtmKCRIzkDBiN5x2zKLg7qBzsqKdzyeBiBI/QAPCoXuTk4g=,iv:m4GKvZ8g4dniAbTnUO+wjZlYx6uCJcCwkanoAzjciuY=,tag:vUUHFcGg5OIjDHeI0B+RGw==,type:str]
|
||||
pgp: []
|
||||
encrypted_suffix: secret
|
||||
version: 3.7.1
|
1
tests/ops/fetch-git/private-repo/cue.mod/module.cue
Normal file
1
tests/ops/fetch-git/private-repo/cue.mod/module.cue
Normal file
@ -0,0 +1 @@
|
||||
module: ""
|
2
tests/ops/fetch-git/private-repo/cue.mod/pkg/.gitignore
vendored
Normal file
2
tests/ops/fetch-git/private-repo/cue.mod/pkg/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
# dagger universe
|
||||
alpha.dagger.io
|
Reference in New Issue
Block a user