Skip to content

Commit 4eab967

Browse files
authored
Merge pull request #21542 from wastoresh/mergestorage
[Do not Squash] Merge main change to storage preview branch
2 parents 42d1677 + 0d25382 commit 4eab967

File tree

893 files changed

+89916
-17598
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

893 files changed

+89916
-17598
lines changed

.azure-pipelines/live-test.yml

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ parameters:
2323
displayName: PowerShell 7.0.x Version
2424
type: string
2525
default: 7.0.*
26-
- name: ps_7_1_x
27-
displayName: PowerShell 7.1.x Version
28-
type: string
29-
default: 7.1.*
3026
- name: ps_7_2_x
3127
displayName: PowerShell 7.2.x Version
3228
type: string
@@ -88,14 +84,6 @@ jobs:
8884
psVersion: ${{ parameters.ps_7_0_x }}
8985
dotnetVersion: ${{ parameters.dotnet_sdk_6 }}
9086

91-
- template: util/live-test-steps.yml
92-
parameters:
93-
name: 'ps_7_1_x_win_2019'
94-
vmImage: ${{ parameters.img_windows_2019 }}
95-
osType: 'Windows'
96-
psVersion: ${{ parameters.ps_7_1_x }}
97-
dotnetVersion: ${{ parameters.dotnet_sdk_6 }}
98-
9987
- template: util/live-test-steps.yml
10088
parameters:
10189
name: 'ps_7_2_x_win_2019'
@@ -120,14 +108,6 @@ jobs:
120108
psVersion: ${{ parameters.ps_7_0_x }}
121109
dotnetVersion: ${{ parameters.dotnet_sdk_6 }}
122110

123-
- template: util/live-test-steps.yml
124-
parameters:
125-
name: 'ps_7_1_x_win_2022'
126-
vmImage: ${{ parameters.img_windows_2022 }}
127-
osType: 'Windows'
128-
psVersion: ${{ parameters.ps_7_1_x }}
129-
dotnetVersion: ${{ parameters.dotnet_sdk_6 }}
130-
131111
- template: util/live-test-steps.yml
132112
parameters:
133113
name: 'ps_7_2_x_win_2022'
@@ -152,14 +132,6 @@ jobs:
152132
psVersion: ${{ parameters.ps_7_0_x }}
153133
dotnetVersion: ${{ parameters.dotnet_sdk_6 }}
154134

155-
- template: util/live-test-steps.yml
156-
parameters:
157-
name: 'ps_7_1_x_linux'
158-
vmImage: ${{ parameters.img_linux }}
159-
osType: 'Linux'
160-
psVersion: ${{ parameters.ps_7_1_x }}
161-
dotnetVersion: ${{ parameters.dotnet_sdk_6 }}
162-
163135
- template: util/live-test-steps.yml
164136
parameters:
165137
name: 'ps_7_2_x_linux'
@@ -184,14 +156,6 @@ jobs:
184156
psVersion: ${{ parameters.ps_7_0_x }}
185157
dotnetVersion: ${{ parameters.dotnet_sdk_6 }}
186158

187-
- template: util/live-test-steps.yml
188-
parameters:
189-
name: 'ps_7_1_x_macOS'
190-
vmImage: ${{ parameters.img_macos }}
191-
osType: 'MacOS'
192-
psVersion: ${{ parameters.ps_7_1_x }}
193-
dotnetVersion: ${{ parameters.dotnet_sdk_6 }}
194-
195159
- template: util/live-test-steps.yml
196160
parameters:
197161
name: 'ps_7_2_x_macOS'

.azure-pipelines/release-test.yml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ parameters:
77
displayName: PowerShell 7.0.x Version
88
type: string
99
default: 7.0.*
10-
- name: ps7_1
11-
displayName: PowerShell 7.1.x Version
12-
type: string
13-
default: 7.1.*
1410
- name: ps7_2
1511
displayName: PowerShell 7.2.x Version
1612
type: string
@@ -64,14 +60,6 @@ jobs:
6460
psVersion: ${{ parameters.ps7 }}
6561
netCoreVersion: ${{ parameters.netCoreVersion }}
6662

67-
- template: util/smoke-test-steps.yml
68-
parameters:
69-
name: 'Win_PS7_1_X_SmokeTest'
70-
agentPoolName: ${{ variables.winAgentPoolName }}
71-
agentPoolVMImage: ${{ variables.winAgentPoolVMImage }}
72-
psVersion: ${{ parameters.ps7_1 }}
73-
netCoreVersion: ${{ parameters.netCoreVersion }}
74-
7563
- template: util/smoke-test-steps.yml
7664
parameters:
7765
name: 'Win_PS7_2_X_SmokeTest'
@@ -112,14 +100,6 @@ jobs:
112100
psVersion: ${{ parameters.ps7 }}
113101
netCoreVersion: ${{ parameters.netCoreVersion }}
114102

115-
- template: util/smoke-test-steps.yml
116-
parameters:
117-
name: 'Linux_PS7_1_X_SmokeTest'
118-
agentPoolName: ${{ variables.linuxAgentPoolName }}
119-
agentPoolVMImage: ${{ variables.linuxAgentPoolVMImage }}
120-
psVersion: ${{ parameters.ps7_1 }}
121-
netCoreVersion: ${{ parameters.netCoreVersion }}
122-
123103
- template: util/smoke-test-steps.yml
124104
parameters:
125105
name: 'Linux_PS7_2_X_SmokeTest'
@@ -160,14 +140,6 @@ jobs:
160140
psVersion: ${{ parameters.ps7 }}
161141
netCoreVersion: ${{ parameters.netCoreVersion }}
162142

163-
- template: util/smoke-test-steps.yml
164-
parameters:
165-
name: 'MacOS_PS7_1_X_SmokeTest'
166-
agentPoolName: ${{ variables.macOsAgentPoolName }}
167-
agentPoolVMImage: ${{ variables.macOsAgentPoolVMImage }}
168-
psVersion: ${{ parameters.ps7_1 }}
169-
netCoreVersion: ${{ parameters.netCoreVersion }}
170-
171143
- template: util/smoke-test-steps.yml
172144
parameters:
173145
name: 'MacOS_PS7_2_X_SmokeTest'

.azure-pipelines/util/live-test-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ jobs:
123123

124124
- task: PowerShell@2
125125
displayName: Save live test results to Kusto
126-
condition: succeededOrFailed()
126+
condition: and(succeededOrFailed(), eq(variables['Build.Reason'], 'Schedule'))
127127
inputs:
128128
pwsh: true
129129
targetType: filePath

documentation/Debugging-StaticAnalysis-Errors.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ msbuild build.proj
3333
The three most common Static Analysis errors are breaking changes, signature issues, and help issues. To figure out which type of error is causing the build failure, open each of the relevant .csv files (if the .csv file does not exist, there is no violation detected). Any issue marked with severity 0 or 1 must be resolved in order for the build to pass.
3434

3535
### Assembly Version Conflict
36-
(To be Updated)
36+
We utilize some shared assemblies, such as Azure.Core, accross all the modules to avoid duplicating. To maintain consistency, only one version is allowed to be loaded within a single PowerShell session. If any errors occur, they will be recorded in the `AssemblyVersionConflict.csv` file. We recommend reviewing each error listed in this file and updating your package dependencies accordingly. Generally, suppressing these issues is not advised.
3737

3838
### Breaking Changes
3939
If you make a change that could cause a breaking change, it will be listed in `BreakingChangeIssues.csv`. Please look at each of these errors in this file, and if they do indeed introduce a breaking change in a non-breaking change release, please revert the change that caused this violation.
@@ -57,13 +57,13 @@ Example issues occur when your changed markdown files in the `help` folder (_e.g
5757
- Push the changes to the .csv file and ensure the errors no longer show up in the `ExampleIssues.csv` file output from the CI pipeline artifacts.
5858
-
5959
### Extra Assemblies
60-
(To be Updated)
60+
We will examine each assembly within the module's artifacts folder to identify any assembly that is actually not needed to pack into the package, for example a a system assembly. The names of these assemblies will be documented in the `ExtraAssemblies.csv` file. As these assemblies serve no purpose for this module, they should be removed to decrease the module package size. It is important to verify whether these files were copied due to an incorrect copy step, such as a `Copy` action in a `props` or `csproj` file. Generally, suppressing these issues is not advised.
6161

6262
### Help Issues
6363
Most help issues that cause StaticAnalysis to fail occur when help has not been added for a particular cmdlet. If you have not generated help for your new cmdlets, please follow the instructions [here](https://github.com/Azure/azure-powershell/blob/main/documentation/development-docs/help-generation.md). If this is not the issue, follow the steps listed under "Remediation" for each violation listed in HelpIssues.csv.
6464

6565
### Missing Assemblies
66-
(To be Updated)
66+
We will ensure that all required assemblies are located within the module's artifacts folder for packaging purposes. If a necessary assembly is not included, the module cannot be imported. Any missing assemblies will be documented in the `MissingAssemblies.csv` file. It is important to investigate the reason behind a missing assembly, such as the assembly being loaded as a shared assembly but not added to the allowed list defined in `DependencyAnalyzer.cs`.
6767

6868
### Signature Issues
6969
Signature issues occur when your cmdlets do not follow PowerShell standards. Please check the [_Cmdlet Best Practices_](https://github.com/Azure/azure-powershell/blob/main/documentation/development-docs/design-guidelines/cmdlet-best-practices.md) and the [_Parameter Best Practices_](https://github.com/Azure/azure-powershell/blob/main/documentation/development-docs/design-guidelines/parameter-best-practices.md) documents to ensure you are following PowerShell guidelines. Issues with severity 0 or 1 must be addressed, while issues with severity 2 are advisory. If you have an issue with severity 0 or 1 that has been approved by the Azure PowerShell team, you can suppress them following these steps:
@@ -109,4 +109,4 @@ Please check whether you have matched the correct number of **quotes** and **bra
109109
- MissingArrayIndexExpression: Array index expression is missing or not valid.
110110
- UnexpectedToken: Unexpected token xxx. (Check whether you have missed or added extra quote)
111111

112-
In this scenario, many other unreasonable errors will occur. Leave them alone. Just make sure you have correct the number of **quotes** and **brackets** and rerun the CI verification.
112+
In this scenario, many other unreasonable errors will occur. Leave them alone. Just make sure you have correct the number of **quotes** and **brackets** and rerun the CI verification.

src/Accounts/Accounts.Test/EnvironmentCmdletTests.cs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,39 @@ public void GetsAzureEnvironment()
546546
Assert.Single(environments);
547547
}
548548

549+
[Fact]
550+
[Trait(Category.AcceptanceType, Category.CheckIn)]
551+
public void GetsAllAzureEnvironments()
552+
{
553+
List<PSAzureEnvironment> environments = null;
554+
Mock<ICommandRuntime> commandRuntimeMock = new Mock<ICommandRuntime>();
555+
commandRuntimeMock.Setup(c => c.WriteObject(It.IsAny<object>(), It.IsAny<bool>()))
556+
.Callback<object, bool>((e, _) => environments = (List<PSAzureEnvironment>)e);
557+
558+
var cmdlet = new GetAzureRMEnvironmentCommand()
559+
{
560+
CommandRuntime = commandRuntimeMock.Object
561+
};
562+
563+
cmdlet.InvokeBeginProcessing();
564+
cmdlet.ExecuteCmdlet();
565+
cmdlet.InvokeEndProcessing();
566+
567+
Assert.Equal(3, environments.Count);
568+
569+
var publicEnvironmentRef = EnvironmentCmdletTestsExtension.GetAzureCloudEndpoints();
570+
var publicEnvironment = environments.Where(x => 0 == string.Compare(x.Name, "AzureCloud")).First();
571+
Assert.True(publicEnvironment.IsAbsolutelyEqual(publicEnvironmentRef));
572+
573+
var chinaEnvironmentRef = EnvironmentCmdletTestsExtension.GetAzureChinaCloudEndpoints();
574+
var chinaEnvironment = environments.Where(x => 0 == string.Compare(x.Name, "AzureChinaCloud")).First();
575+
Assert.True(chinaEnvironment.IsAbsolutelyEqual(chinaEnvironmentRef));
576+
577+
var usEnvironmentRef = EnvironmentCmdletTestsExtension.GetAzureUSGovernmentEndpoints();
578+
var usEnvironment = environments.Where(x => 0 == string.Compare(x.Name, "AzureUSGovernment")).First();
579+
Assert.True(usEnvironment.IsAbsolutelyEqual(usEnvironmentRef));
580+
}
581+
549582
[Fact]
550583
[Trait(Category.AcceptanceType, Category.CheckIn)]
551584
public void ThrowsWhenSettingPublicEnvironment()

0 commit comments

Comments
 (0)