Skip to content
This repository was archived by the owner on Jul 6, 2026. It is now read-only.

mgmt, support more type for generated mock test - #1819

Merged
weidongxu-microsoft merged 7 commits into
Azure:mainfrom
weidongxu-microsoft:mgmt_generate-more-mock-test
Nov 4, 2022
Merged

mgmt, support more type for generated mock test#1819
weidongxu-microsoft merged 7 commits into
Azure:mainfrom
weidongxu-microsoft:mgmt_generate-more-mock-test

Conversation

@weidongxu-microsoft

@weidongxu-microsoft weidongxu-microsoft commented Nov 3, 2022

Copy link
Copy Markdown
Member

support SimpleSyncRestResponse

using same PR for test Azure/azure-sdk-for-java#31881
mostly this commit Azure/azure-sdk-for-java@edb9a65 (it contains some errors that fixed later)

@weidongxu-microsoft weidongxu-microsoft added the Mgmt This issue is related to a management-plane library. label Nov 3, 2022
@weidongxu-microsoft
weidongxu-microsoft force-pushed the mgmt_generate-more-mock-test branch from ca7d58f to 2eb9aec Compare November 3, 2022 05:35
@weidongxu-microsoft
weidongxu-microsoft marked this pull request as ready for review November 3, 2022 08:35
duration = duration.plusSeconds(RANDOM.nextInt(10 * 24 * 60 * 60));
return duration.toString();
} else if (type == ClassType.UUID) {
return UUID.randomUUID().toString();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why do we make this random generated?

@weidongxu-microsoft weidongxu-microsoft Nov 3, 2022

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

the whole mock data here is randomly generated.

we do this, so that for model / API without example data, we can still test with mock data.

@weidongxu-microsoft
weidongxu-microsoft merged commit 4e77d12 into Azure:main Nov 4, 2022
@weidongxu-microsoft
weidongxu-microsoft deleted the mgmt_generate-more-mock-test branch November 4, 2022 02:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Mgmt This issue is related to a management-plane library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants