Skip to content

Non-hermetic tests in xcodeproj_test.dart #18093

@tvolkert

Description

@tvolkert

#16857 introduced a bunch of tests of the new versioning functionality, which is great. Unfortunately, the tests aren't hermetic - they're accessing the real file system and spawning processes against the real OS. That makes them subject to significantly more flakiness.

We should move these to be hermetic (using the mock process manager and memory file system, etc.). For example, the other tests in xcodeproj_test.dart use testUsingOsxContext(), which sets up all the hermetic bindings:

testUsingContext(description, testMethod, overrides: <Type, Generator>{
ProcessManager: () => mockProcessManager,
Platform: () => macOS,
FileSystem: () => fs,
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: tests"flutter test", flutter_test, or one of our testsc: flakeTests that sometimes, but not always, incorrectly pass

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions