Skip to content

Commit

Permalink
automated commit
Browse files Browse the repository at this point in the history
Signed-off-by: Public copy <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Sep 6, 2024
1 parent c5072f7 commit c938a3e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
29 changes: 25 additions & 4 deletions images/bash/tests/main.tf
Original file line number Diff line number Diff line change
@@ -1,14 +1,35 @@
terraform {
required_providers {
oci = { source = "chainguard-dev/oci" }
oci = { source = "chainguard-dev/oci" }
imagetest = { source = "chainguard-dev/imagetest" }
}
}

variable "digest" {
description = "The image digest to run tests over."
}

data "oci_exec_test" "runs" {
digest = var.digest
script = "${path.module}/runs.sh"
data "imagetest_inventory" "this" {}

resource "imagetest_harness_docker" "this" {
name = "bash"
inventory = data.imagetest_inventory.this

envs = {
"IMAGE_NAME" : var.digest
}
}

resource "imagetest_feature" "docker" {
name = "Test bash"
harness = imagetest_harness_docker.this

steps = [
{
name = "run a bash function"
cmd = <<EOF
docker run --rm $IMAGE_NAME \
"function hello() { echo 'hello world'; }; hello" |grep "hello world"
EOF
}]
}
7 changes: 0 additions & 7 deletions images/bash/tests/runs.sh

This file was deleted.

0 comments on commit c938a3e

Please sign in to comment.