Skip to content

AzureRT - Add Dynamic Tests for Project and/or Test Runner #448

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

Merged
merged 17 commits into from
Jun 2, 2015

Conversation

huangpf
Copy link
Contributor

@huangpf huangpf commented May 30, 2015

No description provided.

@azurecla
Copy link

Hi @huangpf, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!


It looks like you're working at Microsoft (phuang). If you're full-time, we DON'T require a contribution license agreement.



If you are a vendor, or work for Microsoft Open Technologies, DO please sign the electronic contribution license agreement. It will take 2 minutes and there's no faxing! https://cla.azure.com.

TTYL, AZPRBOT;

@huangpf huangpf changed the title [DO NOT MERGE PLEASE] Test Add Dynamic Tests for PS Test Project and/or Runner Jun 1, 2015
@huangpf huangpf changed the title Add Dynamic Tests for PS Test Project and/or Runner AzureRT - Add Dynamic Tests for PS Test Project and/or Test Runner Jun 1, 2015
@huangpf huangpf changed the title AzureRT - Add Dynamic Tests for PS Test Project and/or Test Runner AzureRT - Add Dynamic Tests for Project and/or Test Runner Jun 1, 2015
public partial class VMDynamicTests
{
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add another AcceptanceType for dynamic tests to distinguish runner tests from other tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test actually can be a check-in test in Playback mode.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When the runner gets this test script and run it on the runner machine, it will be in Live mode.

@huangpf
Copy link
Contributor Author

huangpf commented Jun 1, 2015

retest this please


for ($i = 0; $i -lt $locations.Count; $i++)
{
$locations[$i] = ($locations[$i] -Replace ' ', '').ToLower();
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you remove space and change it to lower case? Should the location name be used as it is?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the canonical form (instructed by the ARM team) is to remove any white spaces and use lower cases.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it a bug in ARM? What happened if we don't remove space? I think creating a VM with 'West US' should work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure whether it's a bug, and it's just safe to use this form. Creating VM is fine, but Get-AzureVMSize -Location "West US" would fail.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think you already fixed Get-AzureVMSize such that it works with "West US". Is there any other cmdlet that does not change to a canonical form and fail with "West US" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. But there may be other cmdlets that are not compatible yet.

May I know what's your concern if only the canonical form is used?

Copy link
Contributor

Choose a reason for hiding this comment

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

If a cmdlet cannot handle a standard location name, I consider it a bug. A customer should not be worried about canonical form and must be able to use a location name from Get-AzureLocation. (Is there any document that a customer should convert a location name to a canonical form for a certain case?) So, any test should not convert a standard location name into a canonical name. It should be handled by cmdlet (or by client library or by server.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, I don't think all users must use the return from Get-AzureLocation, and for example, I may simply know that westus works, but I can understand your suggestion -- you would like to validate that the return values from Get-AzureLocation can be used here.

I would argue that the dynamic tests' focus is not yet about different forms of location strings (for which we have different test cases), as VM create/remove scenario is.

I would suggest we create a new item for follow-up.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, I just wonder if this dynamic test fails if we use only standard location name instead of canonical name. (If fails, where?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can try and let you know, :-)

If there is no error, I would update the PR, ;-)

ogail added a commit that referenced this pull request Jun 2, 2015
AzureRT - Add Dynamic Tests for Project and/or Test Runner
@ogail ogail merged commit fcbce5d into Azure:dev Jun 2, 2015
huangpf added a commit to AzureRT/azure-powershell that referenced this pull request Mar 4, 2016
HPF PR: dev <- Azure:dev
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.

4 participants