Skip to content

Commit

Permalink
fix: Don't check if the ffprobe executable path matches while testing (
Browse files Browse the repository at this point in the history
…#338)

This allows using the FFPROBE environment variable when running tests locally
  • Loading branch information
Euklios authored Aug 8, 2024
1 parent fa72c36 commit 2ce21da
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/test/java/net/bramp/ffmpeg/FFprobeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -423,11 +423,11 @@ public void testProbeDefaultArguments() throws IOException {

verify(runFunc, times(2)).run(argsCaptor.capture());

List<String> value = argsCaptor.getValue();
List<String> value = argsCaptor.getValue().subList(1, argsCaptor.getValue().size());

assertThat(
value,
is(ImmutableList.of("ffprobe", "-v", "quiet", "-print_format", "json", "-show_error", "-show_format", "-show_streams", "-show_chapters", Samples.always_on_my_mind))
is(ImmutableList.of("-v", "quiet", "-print_format", "json", "-show_error", "-show_format", "-show_streams", "-show_chapters", Samples.always_on_my_mind))
);
}

Expand All @@ -437,11 +437,11 @@ public void testProbeProbeBuilder() throws IOException {

verify(runFunc, times(2)).run(argsCaptor.capture());

List<String> value = argsCaptor.getValue();
List<String> value = argsCaptor.getValue().subList(1, argsCaptor.getValue().size());

assertThat(
value,
is(ImmutableList.of("ffprobe", "-v", "quiet", "-print_format", "json", "-show_error", "-show_format", "-show_streams", "-show_chapters", Samples.always_on_my_mind))
is(ImmutableList.of("-v", "quiet", "-print_format", "json", "-show_error", "-show_format", "-show_streams", "-show_chapters", Samples.always_on_my_mind))
);
}

Expand All @@ -451,11 +451,11 @@ public void testProbeProbeBuilderBuilt() throws IOException {

verify(runFunc, times(2)).run(argsCaptor.capture());

List<String> value = argsCaptor.getValue();
List<String> value = argsCaptor.getValue().subList(1, argsCaptor.getValue().size());

assertThat(
value,
is(ImmutableList.of("ffprobe", "-v", "quiet", "-print_format", "json", "-show_error", "-show_format", "-show_streams", "-show_chapters", Samples.always_on_my_mind))
is(ImmutableList.of("-v", "quiet", "-print_format", "json", "-show_error", "-show_format", "-show_streams", "-show_chapters", Samples.always_on_my_mind))
);
}

Expand All @@ -465,11 +465,11 @@ public void testProbeProbeExtraArgs() throws IOException {

verify(runFunc, times(2)).run(argsCaptor.capture());

List<String> value = argsCaptor.getValue();
List<String> value = argsCaptor.getValue().subList(1, argsCaptor.getValue().size());

assertThat(
value,
is(ImmutableList.of("ffprobe", "-v", "quiet", "-print_format", "json", "-show_error", "-rw_timeout", "0", "-show_format", "-show_streams", "-show_chapters", Samples.always_on_my_mind))
is(ImmutableList.of("-v", "quiet", "-print_format", "json", "-show_error", "-rw_timeout", "0", "-show_format", "-show_streams", "-show_chapters", Samples.always_on_my_mind))
);
}

Expand All @@ -479,11 +479,11 @@ public void testProbeProbeUserAgent() throws IOException {

verify(runFunc, times(2)).run(argsCaptor.capture());

List<String> value = argsCaptor.getValue();
List<String> value = argsCaptor.getValue().subList(1, argsCaptor.getValue().size());

assertThat(
value,
is(ImmutableList.of("ffprobe", "-v", "quiet", "-print_format", "json", "-show_error", "-user_agent", "ffmpeg-cli-wrapper", "-show_format", "-show_streams", "-show_chapters", Samples.always_on_my_mind))
is(ImmutableList.of("-v", "quiet", "-print_format", "json", "-show_error", "-user_agent", "ffmpeg-cli-wrapper", "-show_format", "-show_streams", "-show_chapters", Samples.always_on_my_mind))
);
}
}

0 comments on commit 2ce21da

Please sign in to comment.