Skip to content

Fix broken test: Mock runFunc and add assertions to FFmpegGetInfoTest#271

Merged
bramp merged 1 commit intobramp:masterfrom
Euklios:issue/256-public-enum-codec-broken-test
Oct 9, 2022
Merged

Fix broken test: Mock runFunc and add assertions to FFmpegGetInfoTest#271
bramp merged 1 commit intobramp:masterfrom
Euklios:issue/256-public-enum-codec-broken-test

Conversation

@Euklios
Copy link
Copy Markdown
Collaborator

@Euklios Euklios commented Oct 9, 2022

PR #256 added a static reference that cannot be resolved unless we run on a specific environment.
Additionally, the runFunc has not been mocked, resulting in an actual call to the FFmpeg executable.

I have applied the following modifications:

  • Mock load the regular mocks for ffmpeg -version and ffmpeg -codecs.
  • Break after each case (the old syntax would otherwise fall through and add to all consecutive lists)
  • Add a dataCodecs list and another codecs list (the second one should always be empty unless FFmpeg adds another CodecType)
  • Add assertions for the size of each collection and assert the existence of at least one element within it

@Euklios Euklios force-pushed the issue/256-public-enum-codec-broken-test branch from ca40ef1 to 636bc42 Compare October 9, 2022 20:54
@bramp bramp merged commit 2b1f65c into bramp:master Oct 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants