Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test coverage of compound bash commands #234

Merged
merged 1 commit into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tests/fixtures/complex_command_procfile/Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Tests use of compound bash commands, both quote styles, nested quoting and variable interpolation.
web: echo 'this is the "web" process!' && echo "\"PORT\" is set to: '${PORT}'"
21 changes: 21 additions & 0 deletions tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,27 @@ fn test_multiple_non_web_procfile() {
);
}

#[test]
#[ignore = "integration test"]
// Tests use of compound bash commands, both quote styles, nested quoting and variable interpolation.
fn test_complex_command_procfile() {
TestRunner::default().build(
BuildConfig::new(
"heroku/builder:22",
"tests/fixtures/complex_command_procfile",
),
|context| {
context.start_container(ContainerConfig::new().env("PORT", "12345"), |container| {
let log_output = container.logs_wait();
assert_eq!(
log_output.stdout,
"this is the \"web\" process!\n\"PORT\" is set to: '12345'\n"
);
});
},
);
}

#[test]
#[ignore = "integration test"]
// Tests a Procfile that happens to not be valid YAML, but is still valid according
Expand Down