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

Modify integration tests regarding to the improvement that allowing an API and a Common policy to have same name and version #1243

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RusJaI
Copy link
Contributor

@RusJaI RusJaI commented Dec 24, 2024

APICTL related tests modifications for wso2/api-manager#3109

…n API and a Common policy to have same name and version
@npamudika
Copy link
Contributor

The following test is failing, please check and fix.

2025-01-10T09:44:05.1084602Z --- FAIL: TestAPIOperationPolicyUpdate (14.85s)
2025-01-10T09:44:05.1085222Z     --- FAIL: TestAPIOperationPolicyUpdate/CTL_user_admin_Super_Tenant (14.85s)
2025-01-10T09:44:05.1088252Z         helper.go:61: base.Execute() - apictl command: ../build/target/extracted/apictl/apictl add env development --apim https://localhost:9443
2025-01-10T09:44:05.1089553Z         helper.go:65: base.Execute() - apictl command output: Default token endpoint 'https://localhost:9443/oauth2/token' is added as the token endpoint 
2025-01-10T09:44:05.1090315Z             Successfully added environment 'development'
2025-01-10T09:44:05.1090614Z             
2025-01-10T09:44:05.1091404Z         helper.go:61: base.Execute() - apictl command: ../build/target/extracted/apictl/apictl login development -u admin -p admin -k --verbose
2025-01-10T09:44:05.1092508Z         helper.go:65: base.Execute() - apictl command output: Warning: Using --password in CLI is not secure. Use --password-stdin
2025-01-10T09:44:05.1093188Z             Logged into APIM in  development environment
2025-01-10T09:44:05.1093909Z             WARNING: credentials are stored as a plain text in /home/runner/.wso2apictl.local/keys.json
2025-01-10T09:44:05.1094337Z             
2025-01-10T09:44:05.1095281Z         helper.go:61: base.Execute() - apictl command: ../build/target/extracted/apictl/apictl init CFJGMDVPRARHNAQL --oas testdata/openAPI3Definition.yaml --verbose -f
2025-01-10T09:44:05.1097119Z         helper.go:65: base.Execute() - apictl command output: Initializing a new WSO2 API Manager project in /home/runner/work/product-apim-tooling/product-apim-tooling/import-export-cli/integration/CFJGMDVPRARHNAQL
2025-01-10T09:44:05.1097997Z             Project initialized
2025-01-10T09:44:05.1098331Z             Open README file to learn more
2025-01-10T09:44:05.1098593Z             
2025-01-10T09:44:05.1099547Z         helper.go:365: base.CreateTempDir() - path: /home/runner/work/product-apim-tooling/product-apim-tooling/import-export-cli/integration/CFJGMDVPRARHNAQL/Policies
2025-01-10T09:44:05.1101677Z         helper.go:61: base.Execute() - apictl command: ../build/target/extracted/apictl/apictl import api -f /home/runner/work/product-apim-tooling/product-apim-tooling/import-export-cli/integration/CFJGMDVPRARHNAQL -e development -k --verbose --preserve-provider=true
2025-01-10T09:44:05.1103327Z         helper.go:65: base.Execute() - apictl command output: Successfully imported API.
2025-01-10T09:44:05.1103705Z             
2025-01-10T09:44:05.1105601Z         helper.go:61: base.Execute() - apictl command: ../build/target/extracted/apictl/apictl import api -f /home/runner/work/product-apim-tooling/product-apim-tooling/import-export-cli/integration/CFJGMDVPRARHNAQL -e development --preserve-provider=true -k --update --verbose
2025-01-10T09:44:05.1108059Z         helper.go:65: base.Execute() - apictl command output: Successfully imported API.
2025-01-10T09:44:05.1108671Z             
2025-01-10T09:44:05.1110061Z         helper.go:61: base.Execute() - apictl command: ../build/target/extracted/apictl/apictl export api -n SwaggerPetstoreNew -v 1.0.0 -e development
2025-01-10T09:44:05.1111514Z         helper.go:65: base.Execute() - apictl command output: Successfully exported API!
2025-01-10T09:44:05.1113353Z             Find the exported API at /home/runner/.wso2apictl/exported/apis/development/SwaggerPetstoreNew_1.0.0.zip
2025-01-10T09:44:05.1114191Z             
2025-01-10T09:44:05.1115207Z         helper.go:61: base.Execute() - apictl command: ../build/target/extracted/apictl/apictl logout development
2025-01-10T09:44:05.1116754Z         helper.go:65: base.Execute() - apictl command output: Logged out from APIM in  development  environment
2025-01-10T09:44:05.1117456Z             
2025-01-10T09:44:05.1118518Z         helper.go:61: base.Execute() - apictl command: ../build/target/extracted/apictl/apictl remove env development
2025-01-10T09:44:05.1119917Z         helper.go:65: base.Execute() - apictl command output: Successfully removed environment 'development'
2025-01-10T09:44:05.1121094Z             Execute 'apictl add env --help' to see how to add a new environment
2025-01-10T09:44:05.1121648Z             
2025-01-10T09:44:05.1122933Z panic: open /home/runner/.wso2apictl/exported/apis/development/SwaggerPetstoreNew_1.0.0/SwaggerPetstoreNew-1.0.0/Policies/customAddLogMessage_v1_api.j2: no such file or directory [recovered]
2025-01-10T09:44:05.1125187Z 	panic: open /home/runner/.wso2apictl/exported/apis/development/SwaggerPetstoreNew_1.0.0/SwaggerPetstoreNew-1.0.0/Policies/customAddLogMessage_v1_api.j2: no such file or directory
2025-01-10T09:44:05.1126272Z 
2025-01-10T09:44:05.1126415Z goroutine 90149 [running]:
2025-01-10T09:44:05.1126992Z testing.tRunner.func1.2({0xb20e60, 0xc001316bd0})
2025-01-10T09:44:05.1127699Z 	/opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:1632 +0x3fc
2025-01-10T09:44:05.1128284Z testing.tRunner.func1()
2025-01-10T09:44:05.1128854Z 	/opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:1635 +0x6b6
2025-01-10T09:44:05.1129436Z panic({0xb20e60?, 0xc001316bd0?})
2025-01-10T09:44:05.1130018Z 	/opt/hostedtoolcache/go/1.23.4/x64/src/runtime/panic.go:785 +0x132
2025-01-10T09:44:05.1131264Z github.com/wso2/product-apim-tooling/import-export-cli/integration/base.IsFileContentIdentical({0xc00025c6c0, 0x8b}, {0xc00009a180, 0xb9})
2025-01-10T09:44:05.1132886Z 	/home/runner/work/product-apim-tooling/product-apim-tooling/import-export-cli/integration/base/helper.go:422 +0x12d
2025-01-10T09:44:05.1134627Z github.com/wso2/product-apim-tooling/import-export-cli/integration/testutils.ValidateAPIWithUpdatedSequenceIsExported(0xc000aec9c0, 0xc00029f500, {0xb8daa1, 0x12}, {0xb87ba5, 0x5})
2025-01-10T09:44:05.1136508Z 	/home/runner/work/product-apim-tooling/product-apim-tooling/import-export-cli/integration/testutils/devFirst_testUtils.go:392 +0x145
2025-01-10T09:44:05.1138214Z github.com/wso2/product-apim-tooling/import-export-cli/integration.TestAPIOperationPolicyUpdate.func1(0xc000aec9c0)
2025-01-10T09:44:05.1139724Z 	/home/runner/work/product-apim-tooling/product-apim-tooling/import-export-cli/integration/devFirst_test.go:588 +0xd13
2025-01-10T09:44:05.1140592Z testing.tRunner(0xc000aec9c0, 0xc0006622d0)
2025-01-10T09:44:05.1141434Z 	/opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:1690 +0x227
2025-01-10T09:44:05.1142072Z created by testing.(*T).Run in goroutine 90148
2025-01-10T09:44:05.1142740Z 	/opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:1743 +0x826
2025-01-10T09:44:05.1331487Z exit status 2
2025-01-10T09:44:05.1332123Z FAIL	github.com/wso2/product-apim-tooling/import-export-cli/integration	2652.335s

@RusJaI
Copy link
Contributor Author

RusJaI commented Jan 13, 2025

@npamudika the backend changes are not yet merged. Let's re-trigger the build after those PRs being merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants