Skip to content

Commit 56d930a

Browse files
committed
avoid writing to GH_OUT in more tests
1 parent b284ce9 commit 56d930a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cpp-linter-lib/src/run.rs

+5
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,12 @@ pub async fn run_main(args: Vec<String>) -> i32 {
142142

143143
#[cfg(test)]
144144
mod test {
145+
use std::env;
145146
use super::run_main;
146147

147148
#[tokio::test]
148149
async fn run() {
150+
env::remove_var("GITHUB_OUTPUT"); // avoid writing to GH_OUT in parallel-running tests
149151
assert_eq!(
150152
run_main(vec![
151153
"cpp-linter".to_string(),
@@ -162,6 +164,7 @@ mod test {
162164

163165
#[tokio::test]
164166
async fn run_version_command() {
167+
env::remove_var("GITHUB_OUTPUT"); // avoid writing to GH_OUT in parallel-running tests
165168
assert_eq!(
166169
run_main(vec!["cpp-linter".to_string(), "version".to_string()]).await,
167170
0
@@ -170,6 +173,7 @@ mod test {
170173

171174
#[tokio::test]
172175
async fn run_force_debug_output() {
176+
env::remove_var("GITHUB_OUTPUT"); // avoid writing to GH_OUT in parallel-running tests
173177
assert_eq!(
174178
run_main(vec![
175179
"cpp-linter".to_string(),
@@ -185,6 +189,7 @@ mod test {
185189

186190
#[tokio::test]
187191
async fn run_bad_version_input() {
192+
env::remove_var("GITHUB_OUTPUT"); // avoid writing to GH_OUT in parallel-running tests
188193
assert_eq!(
189194
run_main(vec![
190195
"cpp-linter".to_string(),

0 commit comments

Comments
 (0)