From 6ebc1fffe0b48c28abbc7bdd55689238d9371faf Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 29 Jun 2024 03:25:41 -0400 Subject: [PATCH] fix: use .DNSNames instead of .Aliases in tests Docker has changed their output in an unclear manner, but this is the correct way to check for what dns records are available for usage by apps. --- tests/link_networks.bats | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/link_networks.bats b/tests/link_networks.bats index f75dfbe..3d37638 100755 --- a/tests/link_networks.bats +++ b/tests/link_networks.bats @@ -48,7 +48,7 @@ teardown() { assert_output_contains bridge 0 assert_output_contains custom-network - run docker inspect dokku.$PLUGIN_COMMAND_PREFIX.ls -f '{{range $net,$v := .NetworkSettings.Networks}}{{range $k,$alias := $v.Aliases}}{{printf "alias:%s\n" $alias}}{{end}}{{end}}' + run docker inspect dokku.$PLUGIN_COMMAND_PREFIX.ls -f '{{range $net,$v := .NetworkSettings.Networks}}{{range $k,$alias := $v.DNSNames}}{{printf "alias:%s\n" $alias}}{{end}}{{end}}' echo "output: $output" echo "status: $status" assert_success @@ -120,7 +120,7 @@ teardown() { assert_output_contains custom-network assert_output_contains bridge - run docker inspect dokku.$PLUGIN_COMMAND_PREFIX.ls -f '{{range $net,$v := .NetworkSettings.Networks}}{{range $k,$alias := $v.Aliases}}{{printf "alias:%s\n" $alias}}{{end}}{{end}}' + run docker inspect dokku.$PLUGIN_COMMAND_PREFIX.ls -f '{{range $net,$v := .NetworkSettings.Networks}}{{range $k,$alias := $v.DNSNames}}{{printf "alias:%s\n" $alias}}{{end}}{{end}}' echo "output: $output" echo "status: $status" assert_success @@ -192,7 +192,7 @@ teardown() { assert_output_contains bridge assert_output_contains custom-network - run docker inspect dokku.$PLUGIN_COMMAND_PREFIX.ls -f '{{range $net,$v := .NetworkSettings.Networks}}{{range $k,$alias := $v.Aliases}}{{printf "alias:%s\n" $alias}}{{end}}{{end}}' + run docker inspect dokku.$PLUGIN_COMMAND_PREFIX.ls -f '{{range $net,$v := .NetworkSettings.Networks}}{{range $k,$alias := $v.DNSNames}}{{printf "alias:%s\n" $alias}}{{end}}{{end}}' echo "output: $output" echo "status: $status" assert_success @@ -258,7 +258,7 @@ teardown() { assert_output_contains bridge assert_output_contains custom-network - run docker inspect dokku.$PLUGIN_COMMAND_PREFIX.lsa -f '{{range $net,$v := .NetworkSettings.Networks}}{{range $k,$alias := $v.Aliases}}{{printf "alias:%s\n" $alias}}{{end}}{{end}}' + run docker inspect dokku.$PLUGIN_COMMAND_PREFIX.lsa -f '{{range $net,$v := .NetworkSettings.Networks}}{{range $k,$alias := $v.DNSNames}}{{printf "alias:%s\n" $alias}}{{end}}{{end}}' echo "output: $output" echo "status: $status" assert_success