netlify: enable image customization; improve tests
Signed-off-by: Solomon Hykes <solomon@dagger.io>
This commit is contained in:
26
pkg/universe.dagger.io/netlify/test/testutils/testutils.cue
Normal file
26
pkg/universe.dagger.io/netlify/test/testutils/testutils.cue
Normal file
@@ -0,0 +1,26 @@
|
||||
package testutils
|
||||
|
||||
import (
|
||||
"universe.dagger.io/bash"
|
||||
"universe.dagger.io/alpine"
|
||||
)
|
||||
|
||||
// Assert the text contents available at a URL
|
||||
#AssertURL: {
|
||||
url: string
|
||||
contents: string
|
||||
|
||||
run: bash.#Run & {
|
||||
input: image.output
|
||||
script: "contents": """
|
||||
test "$(curl \(url))" = "\(contents)"
|
||||
"""
|
||||
}
|
||||
|
||||
image: alpine.#Build & {
|
||||
packages: {
|
||||
bash: {}
|
||||
curl: {}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user