-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Modified Batch Track 2 Test format and included sanitizers with custom matchers #35470
Modified Batch Track 2 Test format and included sanitizers with custom matchers #35470
Conversation
/check-enforcer evaluate |
Check Enforcer evaluate was requested, but no Azure Pipelines or Github Actions have been triggered for the changed files. If you are initializing a new service, follow the new service docs. If no Azure Pipelines are desired, run For help using check enforcer, see https://aka.ms/azsdk/checkenforcer |
/check-enforcer override |
@@ -0,0 +1,364 @@ | |||
{ |
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 should also consider migrating the test recordings to assets repo.
Ref - https://github.com/Azure/azure-sdk-for-java/wiki/Test-Proxy-Migration#2-migrate-updated-recordings-to-assets-repo
#33342
…m matchers (#35470) * Extended BatchTestBase from TestProxyTestBase and added sanitzations * Added sanitization rule for http url * Updated azure-core-test versions and migrated test files outside of generated folder * Added custom playback rules and matchers * Added test recording json files * Refactored Shared Key test setup
…m matchers (#35470) * Extended BatchTestBase from TestProxyTestBase and added sanitzations * Added sanitization rule for http url * Updated azure-core-test versions and migrated test files outside of generated folder * Added custom playback rules and matchers * Added test recording json files * Refactored Shared Key test setup
…m matchers (#35470) * Extended BatchTestBase from TestProxyTestBase and added sanitzations * Added sanitization rule for http url * Updated azure-core-test versions and migrated test files outside of generated folder * Added custom playback rules and matchers * Added test recording json files * Refactored Shared Key test setup
…m matchers (#35470) * Extended BatchTestBase from TestProxyTestBase and added sanitzations * Added sanitization rule for http url * Updated azure-core-test versions and migrated test files outside of generated folder * Added custom playback rules and matchers * Added test recording json files * Refactored Shared Key test setup
…m matchers (#35470) * Extended BatchTestBase from TestProxyTestBase and added sanitzations * Added sanitization rule for http url * Updated azure-core-test versions and migrated test files outside of generated folder * Added custom playback rules and matchers * Added test recording json files * Refactored Shared Key test setup
…m matchers (#35470) * Extended BatchTestBase from TestProxyTestBase and added sanitzations * Added sanitization rule for http url * Updated azure-core-test versions and migrated test files outside of generated folder * Added custom playback rules and matchers * Added test recording json files * Refactored Shared Key test setup
…m matchers (#35470) * Extended BatchTestBase from TestProxyTestBase and added sanitzations * Added sanitization rule for http url * Updated azure-core-test versions and migrated test files outside of generated folder * Added custom playback rules and matchers * Added test recording json files * Refactored Shared Key test setup
…m matchers (#35470) * Extended BatchTestBase from TestProxyTestBase and added sanitzations * Added sanitization rule for http url * Updated azure-core-test versions and migrated test files outside of generated folder * Added custom playback rules and matchers * Added test recording json files * Refactored Shared Key test setup
…m matchers (#35470) * Extended BatchTestBase from TestProxyTestBase and added sanitzations * Added sanitization rule for http url * Updated azure-core-test versions and migrated test files outside of generated folder * Added custom playback rules and matchers * Added test recording json files * Refactored Shared Key test setup
…m matchers (#35470) * Extended BatchTestBase from TestProxyTestBase and added sanitzations * Added sanitization rule for http url * Updated azure-core-test versions and migrated test files outside of generated folder * Added custom playback rules and matchers * Added test recording json files * Refactored Shared Key test setup
…m matchers (#35470) * Extended BatchTestBase from TestProxyTestBase and added sanitzations * Added sanitization rule for http url * Updated azure-core-test versions and migrated test files outside of generated folder * Added custom playback rules and matchers * Added test recording json files * Refactored Shared Key test setup
…m matchers (#35470) * Extended BatchTestBase from TestProxyTestBase and added sanitzations * Added sanitization rule for http url * Updated azure-core-test versions and migrated test files outside of generated folder * Added custom playback rules and matchers * Added test recording json files * Refactored Shared Key test setup
…m matchers (#35470) * Extended BatchTestBase from TestProxyTestBase and added sanitzations * Added sanitization rule for http url * Updated azure-core-test versions and migrated test files outside of generated folder * Added custom playback rules and matchers * Added test recording json files * Refactored Shared Key test setup
…m matchers (#35470) * Extended BatchTestBase from TestProxyTestBase and added sanitzations * Added sanitization rule for http url * Updated azure-core-test versions and migrated test files outside of generated folder * Added custom playback rules and matchers * Added test recording json files * Refactored Shared Key test setup
…m matchers (#35470) * Extended BatchTestBase from TestProxyTestBase and added sanitzations * Added sanitization rule for http url * Updated azure-core-test versions and migrated test files outside of generated folder * Added custom playback rules and matchers * Added test recording json files * Refactored Shared Key test setup
…m matchers (#35470) * Extended BatchTestBase from TestProxyTestBase and added sanitzations * Added sanitization rule for http url * Updated azure-core-test versions and migrated test files outside of generated folder * Added custom playback rules and matchers * Added test recording json files * Refactored Shared Key test setup
…m matchers (#35470) * Extended BatchTestBase from TestProxyTestBase and added sanitzations * Added sanitization rule for http url * Updated azure-core-test versions and migrated test files outside of generated folder * Added custom playback rules and matchers * Added test recording json files * Refactored Shared Key test setup
* Created Batch TypeSpec local project * Generated Java Batch SDK * Added README for compiling and emitting Track 2 SDK from TypeSpec * Extended the BatchServiceClientTestBase and created additional tests * Created Task test and fixed TypeSpec test generation configuration * More test modifications and updated TypeSpec with RPC operations * Adding Java SDK generated changes from TypeSpec RPC Operation and visibility * Applied secret decorator to password TypeSpec property and incorporated Java secret emitter package change * Implemented Shared Key authentication for Batch Track 2 (#34871) * Implemented Shared Key auth support for Batch track 2 Implemented Shared Key authentication for Batch Track 2 Readding Date Header Policy and fixed Shared Key logic * Readded generated annotation on token credential * Replaced Base64 from codec with java.util.Base64 (#35214) When building the track 2 SDK with maven, it flags the codec dependency as a "Forbidden dependency". But from JDK 8+, this can be replaced with java.util.Base64. * Modified Batch Track 2 Test format and included sanitizers with custom matchers (#35470) * Extended BatchTestBase from TestProxyTestBase and added sanitzations * Added sanitization rule for http url * Updated azure-core-test versions and migrated test files outside of generated folder * Added custom playback rules and matchers * Added test recording json files * Refactored Shared Key test setup * Applying Unified Model and miscellaneous TypeSpec changes to Java SDK (#35974) * Adding model unification PR changes and testing locally * Changed back java emitter output directory * Updated tests for testing unified models for jobs, tasks, and pools * Added setters to required Pool and Job update properties * Incorporated changes of separate Pool models and fixed corresponding changes within tests * Regenerated SDK from enum doc changes and new Java Typespec emitter version * Added the Bulk Task Create Utility, removed older compute node clients and improved documentation (#36204) * Added bulk task create operation * Modified error handling of bulk task create * Added more Task related tests * Removed renamed and removed ComputeNode and Extension clients and modified documentation * Migrated rest of track 1 Batch tests into track 2 and ported 2023-05-01 API, apiview, and content type changes (#36310) * Applying 2023-05-01.17.0 API and apiview changes * Migrated file and job schedule tests and improved documentation * Added changes from BatchNode.DisableScheduling TypeSpec changes * Removed custom BatchErrorException file * Exported auth package and improved documentation * Remove `throws` for RuntimeException, InterruptedException (#36841) * Flatten TypeSpec and replace BatchSharedKeyCreds with AzureNamedKeyCreds (#37059) * Flatten TypeSpec and update Java SDK accordingly * Update tests to use single Batch client * Generate new test recordings * Remove commented out Type 1 clients * Replace BatchSharedKeyCred with AzureNamedKeyCred * Update recorded Track 2 tests * Assert that auth header contains SharedKey * Update test recordings * [Minor] Reran TypeSpec and placed import correctly * Rename applicable files to use lowercase letters * Move BatchSharedKeyCredsPolicy into impl package * Use PUT and not UPDATE and address all PR comments * Update Record tests * Fix test to get job schedule and assert metadata * Update Record tests * Update tspconfig and SDK to remove ocp date header * Fix timeOut description * Fix typo in extensionName property * Group optional arguments into options bag * Update Record tests * Refactor Options Bag grouping and update clients * Update TypeSpec with renaming changes * Tag internal methods, add subclass per options bag * Update tests for renames and options bag support * Update Record tests * Rename BatchServiceClientTestBase * Fix checkstyle and spotbug warnings * Return object in setter methods instead of void * Update the Record Tests * Fix checkstyle errors in tests * Add return javadoc to options bag setter methods * Fix name of GetBatchNodeRemoteLoginSettingsOptions * Improve setMaxDegreeOfParallelism error message * Add final keyword to WorkingThread instance fields * Add createTasks async implementation and test * Ignore SpotBugs SE_BAD_FIELD for CreateTasksErrorException * Update Record Tests * Added tsp-location.yaml * Update tsp-location.yaml * Generate SDK from official TypeSpec compiler * Make async task functions execute asynchronously * Update Record tests * Rename parameter to azureNamedKeyCredential * Remove InterruptedException from createTasks * Regenerate SDK based off of updated TypeSpec files * Change kernelCPUTime to kernelCpuTime * Change userCPUTime to userCpuTime * Change lun to logicalUnitNumber * Edit logicalUnitNumber docstring and update test * Change terminateReason to terminationReason * Make getNodeFile return streaming data type * Change capitalization in models for accuracy * Revamp BatchClientParallelOptions and fix tests * Edit docstring for clarity * Remove dependency on management library * Remove setPoolInfo method from BatchJob * Make getNodeFileProperties return file properties * Run Record Tests again * Regenerate SDK with Parameters to Content change * Update Record Tests * Delete batch-typespec directory as it is unneeded * Regenerate Java SDK * Update Record Tests * Change getRecursive to isRecursive * Add get prefix to maxDegreeOfParallelism function * Annotate all applicable methods with ServiceMethod * Add overload for list operations * Update dependencies in pom file * Fix return type of getTaskFileProperties * Regenerate Java SDK with new emitter * Update Record Tests * Update ci.yml * Add test proxy configuration * Update assets tag * Update pom.xml versions * Fix endpoint URL * Update assets tag for Record Tests * Fix Playback test errors * Skip test coverage check for preview * Add spelling exceptions to cpsell config file * Add example and troubleshooting sections to Readme * Regenerate Java SDK from latest TypeSpec * Update assets tag for Record Tests * Regenerate SDK with stream style serialization * Fix contentLength parsing error in FileProperties * Regenerate SDK with certificates removed * Override serialization function to fix cert issue * Update assets tag for Record Tests * Update pom.xml dependency version * Update pom.xml * Update tsp-location.yaml and regenerate SDK * Update pom.xml * Regenerate SDK * Fix capitalization on InboundNatPool file name * Fix capitalization in tests * Remove unused imports * Regenerate SDK --------- Co-authored-by: NickKouds <[email protected]> Co-authored-by: David Watrous <[email protected]> Co-authored-by: David Watrous <[email protected]> Co-authored-by: Weidong Xu <[email protected]>
Description
Added test sanitizers and custom matchers for the Batch track 2 tests, reformatted the test files and included test recording files.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines