def METHOD_NAME(self, args, error_message, run_cli, capsys, test_datadir):
    if args.get("-c"):
        args["-c"] = str(test_datadir / "file")
    args = self._build_args(args)
    command = ["pcluster", "build-image"] + args
    run_cli(command, expect_failure=True)
    out, err = capsys.readouterr()
    assert_that(out + err).contains(error_message)