-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: update GitBranchesIT to use auto-commit expectations from GitContext #38517
test: update GitBranchesIT to use auto-commit expectations from GitContext #38517
Conversation
- Created AutoCommitExpectations class to hold auto-commit validation data - Added autoCommitExpectations field to GitContext - Updated GitBranchesTestTemplateProviderCE to provide real auto-commit expectations - No mocks used, following integration test best practices Co-Authored-By: [email protected] <[email protected]>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
⚙️ Control Options:
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
@Override | ||
public Stream<TestTemplateInvocationContext> provideTestTemplateInvocationContexts( | ||
ExtensionContext extensionContext) { | ||
// Create auto-commit expectations based on real application configuration | ||
AutoCommitExpectations autoCommitExpectations = AutoCommitExpectations.builder() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't seem to have incorporated this type inside of GitBranchesIT yet
|
||
public GitContext( | ||
ExtensionContext extensionContext, String fileName, Class<? extends ArtifactExchangeJson> artifactExchangeJsonType, ArtifactType artifactType) { | ||
this(extensionContext, fileName, artifactExchangeJsonType, artifactType, null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gg maintaining the older constructor, are there scenarios where we would specifically require this constructor?
@@ -360,6 +400,12 @@ void test(GitContext gitContext, ExtensionContext extensionContext) throws IOExc | |||
GitArtifactMetadata fooMetadata = fooArtifact.getGitArtifactMetadata(); | |||
assertThat(fooMetadata.getRefName()).isEqualTo("foo"); | |||
|
|||
// Verify branch name matches auto-commit expectations if specified | |||
if (autoCommitExpectations.getExpectedBranchName() != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are we populating this?
This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected. |
Closing due to inactivity. |
Description
This PR enhances the GitBranchesIT test suite to implement constant author checks and utilize auto-commit expectations from GitContext. The implementation ensures consistent author validation across all auto-commits without relying on user input.
Technical Implementation
Constant Author Check
APPSMITH_BOT_USERNAME
("Appsmith_Bot")APPSMITH_BOT_EMAIL
("[email protected]")File Changes
GitBranchesIT.java
AutoCommitExpectations.java
GitBranchesTestTemplateProviderCE.java
GitContext.java
Testing Strategy
Environment Notes
Impact
Link to Devin run: https://app.devin.ai/sessions/19a67d5f828b46688cefc4eed138b898