Skip to content

Commit

Permalink
[chore] Doc fix and test case (#138)
Browse files Browse the repository at this point in the history
* doc fix | refactor | test

* removed enable-gzip

* removed test cache_policy

* removing rules engine test

* auto-generated docs
  • Loading branch information
askazion authored Feb 27, 2024
1 parent c119702 commit 00378c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 21 deletions.
21 changes: 7 additions & 14 deletions func-tests/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,16 @@ resource "azion_edge_application_cache_setting" "testfunc" {
]
}

# TODO: uncomment this test after applying fix for "Default rule"
# resource "azion_edge_application_rule_engine" "testfunc" {
# edge_application_id = azion_edge_application_main_setting.testfunc.edge_application.application_id
# results = {
# name = "Default Rule"
# phase = "request"
# description = ""
# behaviors = [
# name = "Default Rule"
# phase = "default"
# description = ""
# behaviors = [
# {
# name = "set_origin"
# target_object : {
# name = "set_origin",
# target_object = {
# target = azion_edge_application_origin.testfunc.id
# }
# },
Expand All @@ -97,12 +96,6 @@ resource "azion_edge_application_cache_setting" "testfunc" {
# "regex": "1101"
# }
# },
# {
# name = "set_cache_policy"
# target_object : {
# target = azion_edge_application_cache_setting.testfunc.id
# }
# },
# ]
# criteria = [
# {
Expand All @@ -117,7 +110,7 @@ resource "azion_edge_application_cache_setting" "testfunc" {
# }
# ]
# }
# depends_on = [
# depends_on = [
# azion_edge_application_main_setting.testfunc,
# azion_edge_application_origin.testfunc,
# azion_edge_application_cache_setting.testfunc
Expand Down
7 changes: 0 additions & 7 deletions internal/resource_edge_application_rule_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -647,13 +647,6 @@ func (r *rulesEngineResource) Update(ctx context.Context, req resource.UpdateReq
Behaviors: behaviors,
Criteria: criteria,
}
} else {
rulesEngineRequest = edgeapplications.UpdateRulesEngineRequest{
Name: plan.RulesEngine.Name.ValueString(),
Description: plan.RulesEngine.Description.ValueStringPointer(),
Behaviors: behaviors,
Criteria: criteria,
}
}

if phase.ValueString() == "default" {
Expand Down

0 comments on commit 00378c3

Please sign in to comment.