Skip to content

Commit

Permalink
Fluentd module path (#1489)
Browse files Browse the repository at this point in the history
* add a way to configure the test path for the fluentd image

Signed-off-by: James Petersen <[email protected]>

* move the splunk config into its own module

Signed-off-by: James Petersen <[email protected]>

* terraform fmt told me to do it

Signed-off-by: James Petersen <[email protected]>

* switch to working_dir

Signed-off-by: James Petersen <[email protected]>

* terraform fmt told me to do it

Signed-off-by: James Petersen <[email protected]>

---------

Signed-off-by: James Petersen <[email protected]>
  • Loading branch information
found-it authored Sep 29, 2023
1 parent ff871f7 commit 8470c06
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion images/fluentd/tests/01-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ fi
# operate on the container further.
#
start_fluentd_detached() {
SCRIPT_PATH="$(dirname -- "${BASH_SOURCE[0]}")"
docker run \
--detach --rm \
--publish 127.0.0.1:${FREE_PORT}:24224 \
--volume "$(pwd)/images/fluentd/tests/configs/basic_docker.conf:/etc/fluent/fluent.conf" \
--volume "$(pwd)/configs/basic_docker.conf:/etc/fluent/fluent.conf" \
"${IMAGE_NAME}"
sleep 2
}
Expand Down
5 changes: 3 additions & 2 deletions images/fluentd/tests/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ variable "digest" {
}

data "oci_exec_test" "test" {
digest = var.digest
script = "${path.module}/01-test.sh"
digest = var.digest
script = "./01-test.sh"
working_dir = path.module
}
2 changes: 1 addition & 1 deletion images/fluentd/tests/splunk/01-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ start_fluentd_detached() {
docker run \
--detach --rm \
--publish 127.0.0.1:${FREE_PORT}:24224 \
--volume "$(pwd)/images/fluentd/tests/configs/basic_splunk.conf:/etc/fluent/fluent.conf" \
--volume "$(pwd)/configs/basic_splunk.conf:/etc/fluent/fluent.conf" \
"${IMAGE_NAME}"
sleep 15
}
Expand Down
5 changes: 3 additions & 2 deletions images/fluentd/tests/splunk/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ variable "digest" {
}

data "oci_exec_test" "test" {
digest = var.digest
script = "${path.module}/01-test.sh"
digest = var.digest
script = "./01-test.sh"
working_dir = path.module
}

0 comments on commit 8470c06

Please sign in to comment.