Skip to content

Commit

Permalink
Add codemod for onboarding suites to appatic
Browse files Browse the repository at this point in the history
Summary:
# Context
We are rolling out a new CT hook to handle application lifetime and environments , essentially "auto_meckanic for applications". We want to run a similar codemod similar to the one for auto_meckanic to enable it on suites and remove all application handling logic that becomes redundant

# This diff
We introduce a new codemod, based on codemod_automeckanic. Right now the logic is:

- Add `{appatic, #{enable_autoclean => true}}` to suite/0 if the suite calls application or flexi functions
- Remove calls that stop applications or change their environment from end_per functions, as this is done managed by appatic
- Remove such calls from the end of testcases, allowing for trailing `ok`, etc.
- Remove calls to wa_test:stop_applications from end_per functions

# Coming later
Later in the stack we want to add support for:
- Simplifying end_per functions that by now are likely to become just "ok"
- Removing things like `[{apps, Apps} | Config]` from init_per functions, that will now be meaning less since `wa_test:stop_applications()` will be gone

Reviewed By: alanz

Differential Revision: D51988529

fbshipit-source-id: eb760510a28f5854cb9c12356fe0fa3ffe9bf26f
  • Loading branch information
jcpetruzza authored and facebook-github-bot committed Dec 12, 2023
1 parent 848268d commit fe92487
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/ide/src/codemod_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ impl FunctionMatch {
}
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Hash)]
#[allow(clippy::upper_case_acronyms)]
pub struct MFA {
pub module: String,
Expand Down

0 comments on commit fe92487

Please sign in to comment.