Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test failures for 4.4.0-alpha release #1202

Merged
merged 1 commit into from
Sep 28, 2024
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 import-export-cli/impl/importAPIPolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func GetAPIPolicyId(accessToken, environment, policyName, policyVersion string)
headers := make(map[string]string)
headers[utils.HeaderAuthorization] = utils.HeaderValueAuthBearerPrefix + " " + accessToken

queryParams := `query=name:` + policyName + ` version:` + policyVersion
queryParams := `query=name:` + policyName + `&version:` + policyVersion

apiPolicyEndpoint = utils.AppendSlashToString(apiPolicyEndpoint)

Expand Down
2 changes: 1 addition & 1 deletion import-export-cli/integration/apim/apim.go
Original file line number Diff line number Diff line change
Expand Up @@ -2442,7 +2442,7 @@ func (instance *Client) GetAPIPolicy(policyId string) map[string]interface{} {
func (instance *Client) GetAPIPolicyID(t *testing.T, policyName, policyVersion string) string {
var policyListResponse APIPoliciesList

queryParams := "name:" + policyName + " version:" + policyVersion
queryParams := "name:" + policyName + "&version:" + policyVersion

getPoliciesURL := instance.publisherRestURL + operationPolicyResourcePath

Expand Down
2 changes: 2 additions & 0 deletions import-export-cli/integration/testdata/sample-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ data: # Contains the meta data of the API
isDefaultVersion: false # Is API default? true|false, if set to true APIM will discard version and make the API default
enableSchemaValidation: false # Is schema validation enabled? true|false
type: HTTP # Type of the API {HTTP|WS|GRAPHQL|SOAPTOREST} [required]
subtype: DEFAULT
audiences: # Allowed audiences of the API as a list
- all
transport: # Transport protocols as a list
Expand Down Expand Up @@ -176,5 +177,6 @@ data: # Contains the meta data of the API
gatewayVendor: wso2 # Gateway vendor
asyncTransportProtocols: [] # Async transport protocols
gatewayType: wso2/synapse # The gateway type selected for the API policies
egress: false # Whether the API is an egress API or not
enableSubscriberVerification: false # To enable subscriber verification of WebSub APIs

Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ data: # Contains the meta data of the API
isDefaultVersion: false # Is API default? true|false, if set to true APIM will discard version and make the API default
enableSchemaValidation: false # Is schema validation enabled? true|false
type: HTTP # Type of the API {HTTP|WS|GRAPHQL|SOAPTOREST} [required]
subtype: DEFAULT
audiences: # Allowed audiences of the API as a list
- all
transport: # Transport protocols as a list
Expand Down Expand Up @@ -177,4 +178,5 @@ data: # Contains the meta data of the API
gatewayVendor: wso2 # Gateway vendor
asyncTransportProtocols: [] # Async transport protocols
gatewayType: wso2/synapse # The gateway type selected for the API policies
egress: false # Whether the API is an egress API or not
enableSubscriberVerification: false # To enable subscriber verification of WebSub APIs
2 changes: 1 addition & 1 deletion import-export-cli/utils/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ const SandboxKeyType = "SANDBOX"
var GrantTypesToBeSupported = []string{"refresh_token", "password", "client_credentials"}

// WSO2PublicCertificate : wso2 public certificate in PEM format
var WSO2PublicCertificate = []byte{45, 45, 45, 45, 45, 66, 69, 71, 73, 78, 32, 67, 69, 82, 84, 73, 70, 73, 67, 65, 84, 69, 45, 45, 45, 45, 45, 10, 77, 73, 73, 68, 117, 84, 67, 67, 65, 113, 71, 103, 65, 119, 73, 66, 65, 103, 73, 85, 89, 121, 83, 43, 98, 99, 122, 115, 56, 71, 83, 119, 99, 120, 104, 81, 69, 50, 89, 66, 106, 100, 65, 69, 106, 76, 56, 119, 68, 81, 89, 74, 75, 111, 90, 73, 104, 118, 99, 78, 65, 81, 69, 76, 10, 66, 81, 65, 119, 90, 68, 69, 76, 77, 65, 107, 71, 65, 49, 85, 69, 66, 104, 77, 67, 86, 86, 77, 120, 67, 122, 65, 74, 66, 103, 78, 86, 66, 65, 103, 77, 65, 107, 78, 66, 77, 82, 89, 119, 70, 65, 89, 68, 86, 81, 81, 72, 68, 65, 49, 78, 98, 51, 86, 117, 100, 71, 70, 112, 10, 98, 105, 66, 87, 97, 87, 86, 51, 77, 81, 48, 119, 67, 119, 89, 68, 86, 81, 81, 75, 68, 65, 82, 88, 85, 48, 56, 121, 77, 81, 48, 119, 67, 119, 89, 68, 86, 81, 81, 76, 68, 65, 82, 88, 85, 48, 56, 121, 77, 82, 73, 119, 69, 65, 89, 68, 86, 81, 81, 68, 68, 65, 108, 115, 10, 98, 50, 78, 104, 98, 71, 104, 118, 99, 51, 81, 119, 72, 104, 99, 78, 77, 106, 81, 119, 77, 106, 73, 121, 77, 68, 103, 49, 77, 106, 85, 49, 87, 104, 99, 78, 77, 106, 89, 119, 78, 84, 73, 51, 77, 68, 103, 49, 77, 106, 85, 49, 87, 106, 66, 107, 77, 81, 115, 119, 67, 81, 89, 68, 10, 86, 81, 81, 71, 69, 119, 74, 86, 85, 122, 69, 76, 77, 65, 107, 71, 65, 49, 85, 69, 67, 65, 119, 67, 81, 48, 69, 120, 70, 106, 65, 85, 66, 103, 78, 86, 66, 65, 99, 77, 68, 85, 49, 118, 100, 87, 53, 48, 89, 87, 108, 117, 73, 70, 90, 112, 90, 88, 99, 120, 68, 84, 65, 76, 10, 66, 103, 78, 86, 66, 65, 111, 77, 66, 70, 100, 84, 84, 122, 73, 120, 68, 84, 65, 76, 66, 103, 78, 86, 66, 65, 115, 77, 66, 70, 100, 84, 84, 122, 73, 120, 69, 106, 65, 81, 66, 103, 78, 86, 66, 65, 77, 77, 67, 87, 120, 118, 89, 50, 70, 115, 97, 71, 57, 122, 100, 68, 67, 67, 10, 65, 83, 73, 119, 68, 81, 89, 74, 75, 111, 90, 73, 104, 118, 99, 78, 65, 81, 69, 66, 66, 81, 65, 68, 103, 103, 69, 80, 65, 68, 67, 67, 65, 81, 111, 67, 103, 103, 69, 66, 65, 79, 98, 72, 101, 52, 114, 114, 50, 49, 70, 84, 55, 88, 117, 111, 121, 122, 51, 67, 83, 48, 114, 43, 10, 121, 56, 81, 76, 104, 112, 121, 111, 103, 70, 108, 88, 119, 48, 76, 67, 73, 80, 70, 106, 86, 113, 76, 85, 109, 65, 66, 73, 57, 83, 70, 73, 122, 55, 112, 86, 122, 74, 112, 113, 84, 80, 108, 52, 66, 108, 97, 85, 113, 71, 55, 55, 66, 55, 50, 50, 83, 73, 115, 107, 66, 110, 76, 82, 10, 71, 115, 53, 71, 87, 53, 65, 72, 71, 117, 106, 72, 85, 102, 106, 114, 82, 85, 67, 47, 76, 69, 48, 104, 119, 97, 97, 55, 65, 53, 107, 83, 84, 110, 120, 112, 118, 113, 76, 85, 57, 103, 122, 80, 108, 53, 71, 81, 50, 56, 119, 98, 111, 112, 105, 112, 119, 48, 89, 50, 67, 78, 71, 113, 10, 108, 89, 114, 84, 74, 119, 76, 48, 47, 83, 50, 55, 66, 67, 101, 79, 98, 89, 107, 82, 120, 90, 107, 52, 74, 47, 70, 86, 98, 75, 101, 77, 86, 110, 82, 65, 85, 89, 101, 65, 55, 82, 54, 73, 82, 56, 119, 66, 117, 54, 119, 97, 80, 83, 53, 67, 78, 79, 84, 107, 105, 47, 90, 119, 10, 53, 48, 65, 111, 106, 71, 97, 100, 86, 102, 109, 71, 121, 54, 81, 67, 54, 103, 86, 97, 105, 67, 56, 73, 97, 109, 66, 90, 75, 107, 118, 79, 106, 99, 47, 116, 67, 97, 117, 80, 57, 66, 78, 107, 72, 103, 112, 65, 110, 65, 97, 88, 79, 90, 116, 83, 114, 69, 88, 54, 105, 47, 113, 74, 10, 71, 47, 90, 88, 109, 79, 99, 74, 83, 70, 71, 72, 75, 122, 106, 72, 79, 117, 70, 105, 54, 43, 56, 98, 80, 43, 75, 119, 115, 51, 85, 77, 47, 118, 70, 102, 100, 52, 71, 104, 50, 97, 83, 50, 98, 54, 103, 79, 119, 50, 53, 116, 47, 82, 48, 108, 68, 74, 86, 43, 119, 116, 69, 67, 10, 65, 119, 69, 65, 65, 97, 78, 106, 77, 71, 69, 119, 70, 65, 89, 68, 86, 82, 48, 82, 66, 65, 48, 119, 67, 52, 73, 74, 98, 71, 57, 106, 89, 87, 120, 111, 98, 51, 78, 48, 77, 66, 48, 71, 65, 49, 85, 100, 68, 103, 81, 87, 66, 66, 83, 72, 65, 120, 75, 111, 75, 101, 90, 115, 10, 90, 115, 49, 110, 105, 43, 69, 88, 89, 87, 55, 53, 102, 77, 55, 48, 98, 106, 65, 100, 66, 103, 78, 86, 72, 83, 85, 69, 70, 106, 65, 85, 66, 103, 103, 114, 66, 103, 69, 70, 66, 81, 99, 68, 65, 81, 89, 73, 75, 119, 89, 66, 66, 81, 85, 72, 65, 119, 73, 119, 67, 119, 89, 68, 10, 86, 82, 48, 80, 66, 65, 81, 68, 65, 103, 84, 119, 77, 65, 48, 71, 67, 83, 113, 71, 83, 73, 98, 51, 68, 81, 69, 66, 67, 119, 85, 65, 65, 52, 73, 66, 65, 81, 68, 71, 76, 57, 83, 83, 65, 99, 56, 122, 101, 90, 112, 85, 111, 105, 104, 83, 97, 49, 86, 122, 48, 100, 99, 87, 10, 110, 69, 71, 89, 100, 116, 55, 100, 66, 112, 120, 83, 122, 105, 113, 82, 86, 72, 53, 79, 54, 50, 113, 85, 79, 118, 100, 56, 109, 108, 104, 121, 51, 72, 120, 55, 112, 118, 90, 109, 50, 43, 106, 74, 98, 53, 76, 120, 71, 74, 51, 99, 47, 87, 56, 70, 51, 109, 117, 116, 49, 83, 116, 106, 10, 65, 83, 69, 69, 117, 108, 57, 97, 120, 117, 120, 111, 53, 102, 110, 122, 85, 87, 107, 54, 65, 87, 109, 50, 112, 97, 104, 108, 75, 109, 101, 48, 98, 74, 79, 47, 117, 66, 114, 99, 77, 116, 90, 85, 54, 77, 119, 66, 118, 69, 55, 54, 65, 51, 102, 104, 43, 107, 90, 122, 86, 84, 68, 108, 10, 76, 110, 50, 84, 84, 111, 114, 74, 88, 114, 116, 47, 73, 66, 110, 74, 117, 86, 71, 79, 101, 51, 88, 108, 70, 78, 83, 50, 48, 74, 55, 108, 75, 69, 82, 107, 119, 80, 118, 68, 102, 88, 100, 103, 110, 90, 73, 105, 84, 98, 71, 48, 119, 57, 98, 65, 76, 85, 74, 106, 81, 56, 85, 50, 10, 65, 65, 80, 57, 97, 107, 103, 117, 55, 112, 76, 87, 76, 55, 71, 53, 53, 115, 83, 86, 111, 98, 70, 114, 66, 76, 74, 69, 76, 103, 113, 113, 83, 85, 84, 85, 120, 65, 57, 117, 114, 111, 54, 48, 70, 49, 81, 48, 85, 97, 88, 112, 78, 119, 104, 116, 49, 66, 119, 65, 49, 85, 80, 66, 10, 115, 43, 53, 79, 118, 102, 87, 56, 103, 49, 104, 100, 86, 103, 86, 118, 99, 102, 101, 70, 72, 66, 79, 104, 73, 50, 78, 107, 84, 109, 122, 100, 70, 70, 87, 74, 101, 48, 69, 120, 79, 67, 111, 121, 98, 71, 87, 73, 102, 70, 100, 98, 86, 109, 106, 85, 89, 47, 98, 82, 10, 45, 45, 45, 45, 45, 69, 78, 68, 32, 67, 69, 82, 84, 73, 70, 73, 67, 65, 84, 69, 45, 45, 45, 45, 45, 10}
var WSO2PublicCertificate = []byte{45, 45, 45, 45, 45, 66, 69, 71, 73, 78, 32, 67, 69, 82, 84, 73, 70, 73, 67, 65, 84, 69, 45, 45, 45, 45, 45, 10, 77, 73, 73, 68, 113, 84, 67, 67, 65, 112, 71, 103, 65, 119, 73, 66, 65, 103, 73, 69, 90, 116, 43, 57, 56, 106, 65, 78, 66, 103, 107, 113, 104, 107, 105, 71, 57, 119, 48, 66, 65, 81, 115, 70, 65, 68, 66, 107, 77, 81, 115, 119, 67, 81, 89, 68, 86, 81, 81, 71, 69, 119, 74, 86, 10, 85, 122, 69, 76, 77, 65, 107, 71, 65, 49, 85, 69, 67, 65, 119, 67, 81, 48, 69, 120, 70, 106, 65, 85, 66, 103, 78, 86, 66, 65, 99, 77, 68, 85, 49, 118, 100, 87, 53, 48, 89, 87, 108, 117, 73, 70, 90, 112, 90, 88, 99, 120, 68, 84, 65, 76, 66, 103, 78, 86, 66, 65, 111, 77, 10, 66, 70, 100, 84, 84, 122, 73, 120, 68, 84, 65, 76, 66, 103, 78, 86, 66, 65, 115, 77, 66, 70, 100, 84, 84, 122, 73, 120, 69, 106, 65, 81, 66, 103, 78, 86, 66, 65, 77, 77, 67, 87, 120, 118, 89, 50, 70, 115, 97, 71, 57, 122, 100, 68, 65, 101, 70, 119, 48, 121, 78, 68, 65, 53, 10, 77, 84, 65, 119, 77, 122, 77, 122, 77, 68, 90, 97, 70, 119, 48, 121, 78, 106, 69, 121, 77, 84, 81, 119, 77, 122, 77, 122, 77, 68, 90, 97, 77, 71, 81, 120, 67, 122, 65, 74, 66, 103, 78, 86, 66, 65, 89, 84, 65, 108, 86, 84, 77, 81, 115, 119, 67, 81, 89, 68, 86, 81, 81, 73, 10, 68, 65, 74, 68, 81, 84, 69, 87, 77, 66, 81, 71, 65, 49, 85, 69, 66, 119, 119, 78, 84, 87, 57, 49, 98, 110, 82, 104, 97, 87, 52, 103, 86, 109, 108, 108, 100, 122, 69, 78, 77, 65, 115, 71, 65, 49, 85, 69, 67, 103, 119, 69, 86, 49, 78, 80, 77, 106, 69, 78, 77, 65, 115, 71, 10, 65, 49, 85, 69, 67, 119, 119, 69, 86, 49, 78, 80, 77, 106, 69, 83, 77, 66, 65, 71, 65, 49, 85, 69, 65, 119, 119, 74, 98, 71, 57, 106, 89, 87, 120, 111, 98, 51, 78, 48, 77, 73, 73, 66, 73, 106, 65, 78, 66, 103, 107, 113, 104, 107, 105, 71, 57, 119, 48, 66, 65, 81, 69, 70, 10, 65, 65, 79, 67, 65, 81, 56, 65, 77, 73, 73, 66, 67, 103, 75, 67, 65, 81, 69, 65, 117, 72, 115, 80, 102, 76, 106, 109, 66, 88, 50, 67, 75, 104, 101, 50, 120, 68, 80, 70, 72, 53, 98, 108, 105, 118, 97, 112, 109, 79, 101, 73, 43, 71, 99, 68, 101, 75, 74, 68, 79, 83, 110, 104, 10, 78, 115, 53, 120, 111, 101, 85, 43, 79, 82, 81, 109, 84, 105, 80, 48, 103, 84, 65, 51, 72, 97, 79, 86, 51, 90, 107, 68, 114, 114, 115, 54, 74, 108, 104, 103, 48, 50, 122, 70, 97, 115, 114, 117, 48, 111, 90, 87, 116, 76, 102, 113, 106, 99, 78, 101, 110, 43, 119, 53, 112, 79, 108, 86, 10, 103, 118, 105, 50, 51, 83, 112, 57, 73, 81, 109, 54, 108, 110, 102, 86, 80, 103, 73, 79, 56, 112, 90, 98, 106, 97, 43, 114, 86, 100, 86, 53, 74, 78, 55, 85, 88, 99, 117, 111, 111, 100, 112, 108, 121, 68, 97, 110, 65, 79, 74, 56, 90, 115, 101, 57, 110, 67, 43, 80, 55, 74, 57, 88, 10, 84, 105, 102, 101, 83, 99, 114, 99, 107, 112, 109, 78, 106, 111, 103, 80, 85, 101, 77, 79, 97, 50, 49, 103, 108, 43, 119, 110, 89, 68, 79, 117, 111, 86, 65, 80, 72, 43, 73, 104, 120, 57, 47, 74, 90, 117, 69, 66, 89, 99, 79, 65, 76, 86, 114, 54, 107, 57, 119, 51, 70, 119, 118, 83, 10, 57, 50, 72, 90, 56, 70, 115, 76, 97, 82, 118, 102, 53, 50, 52, 120, 68, 103, 88, 53, 108, 68, 112, 103, 82, 98, 54, 47, 122, 56, 120, 121, 117, 66, 102, 83, 68, 120, 55, 80, 69, 87, 85, 66, 119, 55, 109, 109, 57, 54, 82, 84, 100, 115, 74, 85, 103, 79, 81, 74, 48, 88, 98, 106, 10, 78, 71, 100, 57, 107, 72, 97, 51, 49, 86, 47, 71, 82, 70, 48, 106, 97, 90, 70, 83, 76, 102, 79, 82, 68, 97, 106, 85, 56, 101, 78, 120, 79, 87, 122, 118, 52, 49, 77, 90, 117, 119, 73, 68, 65, 81, 65, 66, 111, 50, 77, 119, 89, 84, 65, 85, 66, 103, 78, 86, 72, 82, 69, 69, 10, 68, 84, 65, 76, 103, 103, 108, 115, 98, 50, 78, 104, 98, 71, 104, 118, 99, 51, 81, 119, 72, 81, 89, 68, 86, 82, 48, 79, 66, 66, 89, 69, 70, 67, 103, 74, 51, 71, 72, 107, 79, 117, 87, 65, 47, 102, 49, 113, 113, 66, 112, 105, 77, 53, 104, 51, 88, 79, 114, 115, 77, 66, 48, 71, 10, 65, 49, 85, 100, 74, 81, 81, 87, 77, 66, 81, 71, 67, 67, 115, 71, 65, 81, 85, 70, 66, 119, 77, 66, 66, 103, 103, 114, 66, 103, 69, 70, 66, 81, 99, 68, 65, 106, 65, 76, 66, 103, 78, 86, 72, 81, 56, 69, 66, 65, 77, 67, 66, 80, 65, 119, 68, 81, 89, 74, 75, 111, 90, 73, 10, 104, 118, 99, 78, 65, 81, 69, 76, 66, 81, 65, 68, 103, 103, 69, 66, 65, 66, 110, 104, 88, 86, 97, 98, 118, 74, 99, 80, 117, 121, 53, 73, 99, 98, 71, 57, 106, 57, 47, 120, 119, 90, 76, 52, 77, 106, 52, 75, 116, 53, 75, 106, 121, 110, 98, 50, 67, 115, 89, 111, 111, 50, 88, 89, 10, 77, 84, 52, 55, 106, 75, 117, 84, 101, 80, 50, 66, 80, 102, 79, 75, 112, 113, 52, 43, 82, 89, 86, 80, 69, 50, 67, 85, 79, 115, 114, 81, 118, 68, 106, 81, 75, 115, 99, 102, 90, 54, 78, 77, 109, 107, 88, 47, 76, 117, 105, 73, 66, 78, 81, 89, 116, 120, 90, 69, 66, 79, 110, 75, 10, 101, 85, 107, 111, 100, 72, 53, 105, 97, 99, 70, 87, 111, 85, 88, 103, 100, 66, 83, 105, 72, 109, 105, 104, 99, 55, 77, 49, 97, 65, 88, 52, 97, 68, 48, 65, 113, 98, 75, 54, 56, 98, 118, 122, 104, 67, 108, 100, 113, 119, 66, 87, 67, 101, 109, 76, 43, 90, 104, 113, 115, 72, 99, 57, 10, 102, 71, 113, 106, 101, 109, 71, 52, 47, 52, 108, 55, 75, 83, 53, 99, 111, 114, 53, 104, 119, 47, 108, 76, 72, 106, 103, 118, 109, 54, 83, 67, 80, 120, 57, 85, 82, 76, 90, 111, 97, 87, 83, 68, 88, 65, 113, 102, 109, 97, 88, 43, 122, 70, 119, 83, 80, 71, 86, 47, 72, 88, 109, 114, 10, 88, 90, 72, 74, 114, 72, 54, 79, 53, 67, 54, 53, 71, 70, 119, 56, 113, 50, 122, 110, 101, 66, 112, 106, 114, 86, 56, 115, 56, 48, 68, 52, 107, 119, 89, 68, 72, 82, 108, 77, 87, 86, 113, 103, 87, 99, 88, 100, 88, 57, 110, 120, 89, 104, 85, 121, 80, 69, 112, 67, 102, 57, 76, 112, 10, 83, 116, 97, 53, 97, 81, 83, 78, 49, 108, 111, 102, 84, 90, 103, 68, 77, 111, 118, 89, 72, 111, 83, 103, 75, 79, 87, 115, 88, 50, 66, 121, 120, 65, 102, 82, 110, 119, 69, 61, 10, 45, 45, 45, 45, 45, 69, 78, 68, 32, 67, 69, 82, 84, 73, 70, 73, 67, 65, 84, 69, 45, 45, 45, 45, 45, 10}

// Headers and Header Values
const HeaderAuthorization = "Authorization"
Expand Down
Loading