Fix broken dns test (from merge collision)

And, while I'm at it, fix grammar ("cannot" is one word)

Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
Ed Santiago 2022-09-20 20:02:40 -06:00
parent f0bee4ee3d
commit de9c3841c7
2 changed files with 4 additions and 4 deletions

View File

@ -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")
}
}

View File

@ -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