From de9c3841c788b77e689abbd609d325c5d409a69c Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Tue, 20 Sep 2022 20:02:40 -0600 Subject: [PATCH] Fix broken dns test (from merge collision) And, while I'm at it, fix grammar ("cannot" is one word) Signed-off-by: Ed Santiago --- pkg/cli/build.go | 6 +++--- tests/bud.bats | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/cli/build.go b/pkg/cli/build.go index a2004e1fa..e00cd690c 100644 --- a/pkg/cli/build.go +++ b/pkg/cli/build.go @@ -50,13 +50,13 @@ func GenBuildOptions(c *cobra.Command, inputArgs []string, iopts BuildOptions) ( tags := []string{} if iopts.Network == "none" { if c.Flag("dns").Changed { - return options, nil, nil, errors.New("the --dns option can not be used with --network=none") + return options, nil, nil, errors.New("the --dns option cannot be used with --network=none") } if c.Flag("dns-option").Changed { - return options, nil, nil, errors.New("the --dns-option option can not be used with --network=none") + return options, nil, nil, errors.New("the --dns-option option cannot be used with --network=none") } if c.Flag("dns-search").Changed { - return options, nil, nil, errors.New("the --dns-search option can not be used with --network=none") + return options, nil, nil, errors.New("the --dns-search option cannot be used with --network=none") } } diff --git a/tests/bud.bats b/tests/bud.bats index 89415c827..0ed9fc0d7 100644 --- a/tests/bud.bats +++ b/tests/bud.bats @@ -16,7 +16,7 @@ load helpers for dnsopt in --dns --dns-option --dns-search; do run_buildah 125 build $dnsopt=example.com --network=none $WITH_POLICY_JSON -f $BUDFILES/dns/Dockerfile $BUDFILES/dns - expect_output "the $dnsopt option can not be used with --network=none" "dns options should not be allowed with --network=none" + expect_output "Error: the $dnsopt option cannot be used with --network=none" "dns options should not be allowed with --network=none" done run_buildah build --dns-search=example.com --dns=223.5.5.5 --dns-option=use-vc $WITH_POLICY_JSON -f $BUDFILES/dns/Dockerfile $BUDFILES/dns