forked from AzureRT/azure-powershell
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from markcowl/fixopindata
Update common code changes for new operational insights endpoint
- Loading branch information
Showing
10 changed files
with
209 additions
and
196 deletions.
There are no files selected for viewing
247 changes: 123 additions & 124 deletions
247
src/Common/Commands.Common.Authentication.Abstractions/AzureEnvironment.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -671,6 +671,8 @@ public void ProfileSerializeDeserializeWorks() | |
Name = "testCloud", | ||
ActiveDirectoryAuthority = "http://contoso.com" | ||
}; | ||
environment.SetProperty(AzureEnvironment.ExtendedEndpoint.OperationalInsightsEndpoint, "http://contoso.io"); | ||
environment.SetProperty(AzureEnvironment.ExtendedEndpoint.OperationalInsightsEndpointResourceId, "http://insights.contoso.io/"); | ||
var account = new AzureAccount | ||
{ | ||
Id = "[email protected]", | ||
|
@@ -713,6 +715,10 @@ public void ProfileSerializeDeserializeWorks() | |
var jCurrentProfile = currentProfile.ToString(); | ||
var jDeserializedProfile = deserializedProfile.ToString(); | ||
Assert.Equal(jCurrentProfile, jDeserializedProfile); | ||
Assert.True(deserializedProfile.DefaultContext.Environment.IsPropertySet(AzureEnvironment.ExtendedEndpoint.OperationalInsightsEndpoint)); | ||
Assert.True(deserializedProfile.DefaultContext.Environment.IsPropertySet(AzureEnvironment.ExtendedEndpoint.OperationalInsightsEndpointResourceId)); | ||
Assert.Equal("http://contoso.io", deserializedProfile.DefaultContext.Environment.GetProperty(AzureEnvironment.ExtendedEndpoint.OperationalInsightsEndpoint)); | ||
Assert.Equal("http://insights.contoso.io/", deserializedProfile.DefaultContext.Environment.GetProperty(AzureEnvironment.ExtendedEndpoint.OperationalInsightsEndpointResourceId)); | ||
} | ||
|
||
[Fact] | ||
|
@@ -743,11 +749,12 @@ public void SavingProfileWorks() | |
""BatchEndpointResourceId"": null, | ||
""AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix"": null, | ||
""AzureDataLakeStoreFileSystemEndpointSuffix"": null, | ||
""AzureOperationalInsightsEndpointResourceId"": null, | ||
""AzureOperationalInsightsEndpoint"": null, | ||
""AdTenant"": null, | ||
""VersionProfiles"": [], | ||
""ExtendedProperties"": {} | ||
""ExtendedProperties"": { | ||
""OperationalInsightsEndpoint"": ""http://contoso.io"", | ||
""OperationalInsightsEndpointResourceId"": ""http://insights.contoso.io/"" | ||
} | ||
} | ||
}, | ||
""Contexts"": { | ||
|
@@ -797,11 +804,12 @@ public void SavingProfileWorks() | |
""BatchEndpointResourceId"": null, | ||
""AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix"": null, | ||
""AzureDataLakeStoreFileSystemEndpointSuffix"": null, | ||
""AzureOperationalInsightsEndpointResourceId"": null, | ||
""AzureOperationalInsightsEndpoint"": null, | ||
""AdTenant"": null, | ||
""VersionProfiles"": [], | ||
""ExtendedProperties"": {} | ||
""ExtendedProperties"": { | ||
""OperationalInsightsEndpoint"": ""http://contoso.io"", | ||
""OperationalInsightsEndpointResourceId"": ""http://insights.contoso.io/"" | ||
} | ||
}, | ||
""VersionProfile"": null, | ||
""TokenCache"": { | ||
|
@@ -822,6 +830,8 @@ public void SavingProfileWorks() | |
Name = "testCloud", | ||
ActiveDirectoryAuthority = "http://contoso.com" | ||
}; | ||
environment.SetProperty(AzureEnvironment.ExtendedEndpoint.OperationalInsightsEndpoint, "http://contoso.io"); | ||
environment.SetProperty(AzureEnvironment.ExtendedEndpoint.OperationalInsightsEndpointResourceId, "http://insights.contoso.io/"); | ||
var account = new AzureAccount | ||
{ | ||
Id = "[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.