-
Notifications
You must be signed in to change notification settings - Fork 1k
chore(modelarmor): added floorsettings tests #2144
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
base: main
Are you sure you want to change the base?
chore(modelarmor): added floorsettings tests #2144
Conversation
NOTE: Please set following environment variables required for running tests: |
modelarmor/test/modelarmorTest.php
Outdated
/** | ||
* Reset project floor settings to default values | ||
*/ | ||
protected static function resetProjectFloorSettings(): void |
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.
The code across all the methods of type reset...FloorSettings
seems redundant. Can you please extract the common code in a separate method & use it for Project/Folder/Organization.
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.
Updated logic for resetting floor settings to remove redundant logic.
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.
NOTE: Please set following environment variables required for running tests: MA_FOLDER_ID:
695279264361
MA_ORG_ID:951890214235
Which project are these credentials for? I used these for the standard test project (php-docs-samples-kokoro
) and was unable to get them to work.
modelarmor/test/modelarmorTest.php
Outdated
self::$organizationId = getenv('MA_ORG_ID'); | ||
self::$folderId = getenv('MA_FOLDER_ID'); |
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.
let's use requireEnv
for these, that way people running the tests will know they're required:
self::$organizationId = getenv('MA_ORG_ID'); | |
self::$folderId = getenv('MA_FOLDER_ID'); | |
self::$organizationId = self::requireEnv('MA_ORG_ID'); | |
self::$folderId = self::requireEnv('MA_FOLDER_ID'); |
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.
updated, thanks.
Did not get this. |
Added floor settings tests as issue b/424365799 is fixed.
Added tests for