netlify: enable image customization; improve tests

Signed-off-by: Solomon Hykes <solomon@dagger.io>
This commit is contained in:
Solomon Hykes
2022-02-11 22:28:25 +00:00
parent b52684ff85
commit fbae253f62
3 changed files with 88 additions and 21 deletions

View 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: {}
}
}
}