Skip to content

test: improve test coverage for resourceManager#10344

Open
joehan wants to merge 6 commits intomainfrom
test/resourceManager
Open

test: improve test coverage for resourceManager#10344
joehan wants to merge 6 commits intomainfrom
test/resourceManager

Conversation

@joehan
Copy link
Copy Markdown
Member

@joehan joehan commented Apr 15, 2026

Description

Add unit tests for src/gcp/resourceManager.ts, specifically testing addServiceAccountToRoles and serviceAccountHasRoles.

Scenarios Tested

  • Validating success outcomes of role additions
  • Preventing duplicate role assignment

Sample Commands

npm run mocha -- 'src/gcp/resourceManager.spec.ts'

### Description
Add unit tests for src/gcp/resourceManager.ts, specifically testing addServiceAccountToRoles and serviceAccountHasRoles.

### Scenarios Tested
- Validating success outcomes of role additions
- Preventing duplicate role assignment

### Sample Commands
npm run mocha -- 'src/gcp/resourceManager.spec.ts'
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@joehan
Copy link
Copy Markdown
Member Author

joehan commented Apr 15, 2026

/gemini review

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@joehan
Copy link
Copy Markdown
Member Author

joehan commented Apr 22, 2026

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new test suite for the resourceManager module, covering service account role management and verification. The tests utilize nock to mock Google Cloud Platform API responses. Feedback was provided regarding the use of type casting as an escape hatch in nock configurations, which violates the repository's TypeScript style guide.

Comment thread src/gcp/resourceManager.spec.ts Outdated
Comment thread src/gcp/resourceManager.spec.ts Outdated
Comment thread src/gcp/resourceManager.spec.ts Outdated
@joehan joehan requested a review from aalej April 22, 2026 21:07
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