Documentation ¶
Overview ¶
l7policies unit tests
Index ¶
- Constants
- Variables
- func HandleL7PolicyCreationSuccessfully(t *testing.T, response string)
- func HandleL7PolicyDeletionSuccessfully(t *testing.T)
- func HandleL7PolicyGetSuccessfully(t *testing.T)
- func HandleL7PolicyListSuccessfully(t *testing.T)
- func HandleL7PolicyUpdateSuccessfully(t *testing.T)
- func HandleRuleCreationSuccessfully(t *testing.T, response string)
- func HandleRuleDeletionSuccessfully(t *testing.T)
- func HandleRuleGetSuccessfully(t *testing.T)
- func HandleRuleListSuccessfully(t *testing.T)
- func HandleRuleUpdateSuccessfully(t *testing.T)
Constants ¶
const L7PoliciesListBody = `` /* 1035-byte string literal not displayed */
L7PoliciesListBody contains the canned body of a l7policy list response.
const PostUpdateL7PolicyBody = `` /* 448-byte string literal not displayed */
PostUpdateL7PolicyBody is the canned response body of a Update request on an existing l7policy.
const PostUpdateRuleBody = `` /* 253-byte string literal not displayed */
PostUpdateRuleBody is the canned response body of a Update request on an existing rule.
const RulesListBody = `` /* 662-byte string literal not displayed */
RulesListBody contains the canned body of a rule list response.
const SingleL7PolicyBody = `` /* 421-byte string literal not displayed */
SingleL7PolicyBody is the canned body of a Get request on an existing l7policy.
const SingleRuleBody = `` /* 244-byte string literal not displayed */
SingleRuleBody is the canned body of a Get request on an existing rule.
Variables ¶
var ( L7PolicyToListener = l7policies.L7Policy{ ID: "8a1412f0-4c32-4257-8b07-af4770b604fd", Name: "redirect-example.com", ListenerID: "023f2e34-7806-443b-bfae-16c324569a3d", Action: "REDIRECT_TO_LISTENER", Position: 1, Description: "", TenantID: "e3cd678b11784734bc366148aa37580e", RedirectPoolID: "", RedirectListenerID: "023f2e34-7806-443b-bfae-16c324569a3d", AdminStateUp: true, Rules: []l7policies.Rule{}, } L7PolicyToPool = l7policies.L7Policy{ ID: "964f4ba4-f6cd-405c-bebd-639460af7231", Name: "redirect-pool", ListenerID: "be3138a3-5cf7-4513-a4c2-bb137e668bab", Action: "REDIRECT_TO_POOL", Position: 1, Description: "", TenantID: "c1f7910086964990847dc6c8b128f63c", RedirectPoolID: "bac433c6-5bea-4311-80da-bd1cd90fbd25", RedirectListenerID: "", AdminStateUp: true, Rules: []l7policies.Rule{}, } L7PolicyUpdated = l7policies.L7Policy{ ID: "8a1412f0-4c32-4257-8b07-af4770b604fd", Name: "NewL7PolicyName", ListenerID: "023f2e34-7806-443b-bfae-16c324569a3d", Action: "REDIRECT_TO_LISTENER", Position: 1, Description: "Redirect requests to example.com", TenantID: "e3cd678b11784734bc366148aa37580e", RedirectPoolID: "", RedirectListenerID: "023f2e34-7806-443b-bfae-16c324569a3d", AdminStateUp: true, Rules: []l7policies.Rule{}, } RulePath = l7policies.Rule{ ID: "16621dbb-a736-4888-a57a-3ecd53df784c", RuleType: "PATH", CompareType: "REGEX", Value: "/images*", TenantID: "e3cd678b11784734bc366148aa37580e", Key: "", Invert: true, AdminStateUp: true, } RuleHostName = l7policies.Rule{ ID: "d24521a0-df84-4468-861a-a531af116d1e", RuleType: "HOST_NAME", CompareType: "EQUAL_TO", Value: "www.example.com", TenantID: "e3cd678b11784734bc366148aa37580e", Key: "", Invert: false, AdminStateUp: true, } RuleUpdated = l7policies.Rule{ ID: "16621dbb-a736-4888-a57a-3ecd53df784c", RuleType: "PATH", CompareType: "REGEX", Value: "/images/special*", TenantID: "e3cd678b11784734bc366148aa37580e", Key: "", Invert: false, AdminStateUp: true, } )
Functions ¶
func HandleL7PolicyCreationSuccessfully ¶
HandleL7PolicyCreationSuccessfully sets up the test server to respond to a l7policy creation request with a given response.
func HandleL7PolicyDeletionSuccessfully ¶
HandleL7PolicyDeletionSuccessfully sets up the test server to respond to a l7policy deletion request.
func HandleL7PolicyGetSuccessfully ¶
HandleL7PolicyGetSuccessfully sets up the test server to respond to a l7policy Get request.
func HandleL7PolicyListSuccessfully ¶
HandleL7PolicyListSuccessfully sets up the test server to respond to a l7policy List request.
func HandleL7PolicyUpdateSuccessfully ¶
HandleL7PolicyUpdateSuccessfully sets up the test server to respond to a l7policy Update request.
func HandleRuleCreationSuccessfully ¶
HandleRuleCreationSuccessfully sets up the test server to respond to a rule creation request with a given response.
func HandleRuleDeletionSuccessfully ¶
HandleRuleDeletionSuccessfully sets up the test server to respond to a rule deletion request.
func HandleRuleGetSuccessfully ¶
HandleRuleGetSuccessfully sets up the test server to respond to a rule Get request.
func HandleRuleListSuccessfully ¶
HandleRuleListSuccessfully sets up the test server to respond to a rule List request.
func HandleRuleUpdateSuccessfully ¶
HandleRuleUpdateSuccessfully sets up the test server to respond to a rule Update request.
Types ¶
This section is empty.