fix alpine test + only select major versions for aws pkgs

Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
Sam Alba 2021-04-14 13:35:48 -07:00
parent 39f7170cc5
commit 8e5024db37
2 changed files with 9 additions and 8 deletions

View File

@ -24,10 +24,10 @@ import (
op.#Load & { op.#Load & {
from: alpine.#Image & { from: alpine.#Image & {
"package": package "package": package
"package": bash: "=5.1.0-r0" "package": bash: "=~5.1"
"package": jq: "=1.6-r1" "package": jq: "=~1.6"
"package": curl: "=7.74.0-r1" "package": curl: "=~7.74"
"package": "aws-cli": "=1.18.177-r0" "package": "aws-cli": "=~1.18"
} }
}, },
] ]

View File

@ -8,7 +8,7 @@ import (
TestImageVersion: { TestImageVersion: {
image: alpine.#Image & { image: alpine.#Image & {
// install an old version on purpose // install an old version on purpose
version: "3.10.6" version: "3.10.9"
} }
test: #up: [ test: #up: [
@ -18,7 +18,7 @@ TestImageVersion: {
"sh", "sh",
"-ec", "-ec",
""" """
test "$(cat /etc/alpine-release)" = 3.10.6 test "$(cat /etc/alpine-release)" = 3.10.9
""", """,
] ]
}, },
@ -28,7 +28,8 @@ TestImageVersion: {
TestPackageInstall: { TestPackageInstall: {
image: alpine.#Image & { image: alpine.#Image & {
package: jq: true package: jq: true
package: curl: "=~7.74.0" package: curl: "=~7.76"
version: "3.13"
} }
test: #up: [ test: #up: [
@ -37,7 +38,7 @@ TestPackageInstall: {
args: ["jq", "--version"] args: ["jq", "--version"]
}, },
op.#Exec & { op.#Exec & {
args: ["sh", "-ec", "curl --version | grep -q 7.74.0"] args: ["sh", "-ec", "curl --version | grep -q 7.76"]
}, },
] ]
} }