Skip to content

Commit

Permalink
add tests for faktory image changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jbielick committed Feb 27, 2024
1 parent 09a466d commit 89a3cc2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions faktory/test/unit/statefulset.bats
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@ name="statefulset"
[ "$got" = "docker.io/contribsys/faktory:1.5.1" ]
}

@test "$name: uses correct image registry" {
template $name --set image.registry=user.quay.io

get '.spec.template.spec.containers[1].image'
[ "$got" = "user.quay.io/contribsys/faktory:1.5.1" ]
}

@test "$name: configWater uses correct image registry and repository" {
template $name \
--set configWatcher.image.registry=us-east1.pkg.dev \
--set configWatcher.image.repository=prod/busybox

get '.spec.template.spec.containers[] | select(.name == "config-watcher") | .image'
[ "$got" = "us-east1.pkg.dev/prod/busybox:latest" ]
}

@test "$name: uses correct command" {
template $name

Expand Down

0 comments on commit 89a3cc2

Please sign in to comment.