Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/SDKs/Cdn/Cdn.Tests/ScenarioTests/CustomDomainTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Cdn.Tests.ScenarioTests
{
public class CustomDomainTests
{
[Fact]
[Fact(Skip = "StopEndpoint is now working in prod due to a known issue")]
public void CustomDomainCRUDTest()
{
var handler1 = new RecordedDelegatingHandler { StatusCodeToReturn = HttpStatusCode.OK };
Expand Down
112 changes: 18 additions & 94 deletions src/SDKs/Cdn/Cdn.Tests/ScenarioTests/EndpointTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void EndpointCreateTest()
Profile createParameters = new Profile
{
Location = "WestUs",
Sku = new Sku { Name = SkuName.StandardAkamai },
Sku = new Sku { Name = SkuName.StandardMicrosoft },
Tags = new Dictionary<string, string>
{
{"key1","value1"},
Expand Down Expand Up @@ -109,24 +109,14 @@ public void EndpointCreateTest()
HostName = "host1.hello.com"
}
},
GeoFilters = new List<GeoFilter>
{
new GeoFilter {
RelativePath = "/mycar",
Action = GeoFilterActions.Block,
CountryCodes = new List<string>
{
"AT"
}
}
},
DeliveryPolicy = new EndpointPropertiesUpdateParametersDeliveryPolicy
{
Description = "Test description for a policy.",
Rules = new List<DeliveryRule>
{
new DeliveryRule
{
Name = "rule1",
Order = 1,
Actions = new List<DeliveryRuleAction>
{
Expand All @@ -143,10 +133,10 @@ public void EndpointCreateTest()
{
new DeliveryRuleUrlPathCondition
{
Parameters = new UrlPathConditionParameters
Parameters = new UrlPathMatchConditionParameters
{
Path = "/folder",
MatchType = "Literal"
OperatorProperty = "Equal",
MatchValues = new List <string> {"abc"}
}
}
}
Expand All @@ -169,7 +159,6 @@ public void EndpointCreateTest()
OriginHostHeader = "azurecdn-files.azureedge.net",
OriginPath = "/dsa-test",
QueryStringCachingBehavior = QueryStringCachingBehavior.NotSet,
OptimizationType = OptimizationType.DynamicSiteAcceleration,
ProbePath = "/probe-v.txt",
ContentTypesToCompress = new List<string>(),
Tags = new Dictionary<string, string> { { "kay1", "value1" } },
Expand All @@ -180,17 +169,6 @@ public void EndpointCreateTest()
Name = "origin1",
HostName = "host1.hello.com"
}
},
GeoFilters = new List<GeoFilter>
{
new GeoFilter {
RelativePath = "/mycar",
Action = GeoFilterActions.Block,
CountryCodes = new List<string>
{
"AT"
}
}
}
};

Expand All @@ -212,19 +190,7 @@ public void EndpointCreateTest()
HostName = "host1.hello.com"
}
},
OptimizationType = OptimizationType.LargeFileDownload,
Tags = new Dictionary<string, string> { { "kay1", "value1" } },
GeoFilters = new List<GeoFilter>
{
new GeoFilter {
RelativePath = "/mycar",
Action = GeoFilterActions.Block,
CountryCodes = new List<string>
{
"AT"
}
}
}
Tags = new Dictionary<string, string> { { "kay1", "value1" } }
};

endpoint = cdnMgmtClient.Endpoints.Create(resourceGroupName, profileName, endpointName, endpointCreateParameters);
Expand Down Expand Up @@ -252,6 +218,7 @@ public void EndpointCreateTest()
{
new DeliveryRule
{
Name = "rule1",
Order = 1,
Actions = new List<DeliveryRuleAction>
{
Expand All @@ -268,10 +235,10 @@ public void EndpointCreateTest()
{
new DeliveryRuleUrlPathCondition
{
Parameters = new UrlPathConditionParameters
Parameters = new UrlPathMatchConditionParameters
{
Path = "/folder",
MatchType = "Literal"
OperatorProperty = "Equal",
MatchValues = new List <string> {"abc"}
}
}
}
Expand Down Expand Up @@ -305,6 +272,7 @@ public void EndpointCreateTest()
{
new DeliveryRule
{
Name = "rule1",
Order = 1,
Actions = new List<DeliveryRuleAction>
{
Expand All @@ -321,10 +289,10 @@ public void EndpointCreateTest()
{
new DeliveryRuleUrlPathCondition
{
Parameters = new UrlPathConditionParameters
Parameters = new UrlPathMatchConditionParameters
{
Path = "/folder",
MatchType = "Literal"
OperatorProperty = "Equal",
MatchValues = new List <string> {"abc"}
}
}
}
Expand Down Expand Up @@ -424,17 +392,6 @@ public void EndpointUpdateTest()
Name = "origin1",
HostName = "host1.hello.com"
}
},
GeoFilters = new List<GeoFilter>
{
new GeoFilter {
RelativePath = "/mypicture",
Action = GeoFilterActions.Block,
CountryCodes = new List<string>
{
"AT"
}
}
}
};

Expand Down Expand Up @@ -514,10 +471,10 @@ public void EndpointUpdateTest()
{
new DeliveryRuleUrlPathCondition
{
Parameters = new UrlPathConditionParameters
Parameters = new UrlPathMatchConditionParameters
{
Path = "/folder",
MatchType = "Literal"
OperatorProperty = "Equal",
MatchValues = new List <string> {"abc"}
}
}
}
Expand Down Expand Up @@ -573,40 +530,7 @@ public void EndpointUpdateTest()
"AU"
}
}
},
DeliveryPolicy = new EndpointPropertiesUpdateParametersDeliveryPolicy
{
Description = "Test description for a policy.",
Rules = new List<DeliveryRule>
{
new DeliveryRule
{
Order = 1,
Actions = new List<DeliveryRuleAction>
{
new DeliveryRuleCacheExpirationAction
{
Parameters = new CacheExpirationActionParameters
{
CacheBehavior = "BypassCache",
CacheDuration = null
}
}
},
Conditions = new List<DeliveryRuleCondition>
{
new DeliveryRuleUrlPathCondition
{
Parameters = new UrlPathConditionParameters
{
Path = "/folder",
MatchType = "Literal"
}
}
}
}
}
}
}
};

var endpoint = cdnMgmtClient.Endpoints.Update(resourceGroupName, profileName, endpointName, endpointUpdateParameters);
Expand Down
Loading