Skip to content

Commit

Permalink
Merge pull request #157 from openinfradev/test_tks_api
Browse files Browse the repository at this point in the history
Test tks api
  • Loading branch information
ktkfree authored Apr 14, 2023
2 parents 61d8d6c + 7d8cbbe commit fafd58a
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 159 deletions.
148 changes: 64 additions & 84 deletions tests/tks-e2e-aws-msa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,12 @@ spec:
onExit: notify-slack
arguments:
parameters:
- name: tks_info_url
value: "tks-info.tks.com:9110"
- name: tks_contract_url
value: "tks-contract.tks.com:9110"
- name: tks_cluster_lcm_url
value: "tks-cluster_lcm.tks.com:9110"
- name: tks_api_url
value: "https://tks-api-cicd.taco-cat.xyz"

templates:
- name: main
steps:
- - name: call-create-tks-client-conf
templateRef:
name: tks-cli
template: create-tks-client-conf
- - name: call-generate-names
templateRef:
name: tks-e2e-test-common
Expand All @@ -30,36 +22,34 @@ spec:
parameters:
- name: postfix
value: "aws"
- - name: call-create-contract
templateRef:
name: tks-cli
template: create-contract
arguments:
parameters:
- name: tks_client_conf
value: "{{steps.call-create-tks-client-conf.outputs.parameters.tks_client_conf}}"
- name: contract_name
value: "{{steps.call-generate-names.outputs.parameters.contract-name}}"
- name: creator
value: ""
- name: description
value: "e2e-test"
# - - name: call-create-contract
# templateRef:
# name: tks-cli
# template: create-contract
# arguments:
# parameters:
# - name: tks_client_conf
# value: "{{steps.call-create-tks-client-conf.outputs.parameters.tks_client_conf}}"
# - name: contract_name
# value: "{{steps.call-generate-names.outputs.parameters.contract-name}}"
# - name: creator
# value: ""
# - name: description
# value: "e2e-test"
- - name: call-create-usercluster
templateRef:
name: tks-cli
template: create-usercluster
arguments:
parameters:
- name: tks_client_conf
value: "{{steps.call-create-tks-client-conf.outputs.parameters.tks_client_conf}}"
- name: cluster_name
value: "{{steps.call-generate-names.outputs.parameters.cluster-name}}"
- name: template_name
value: "aws-msa-reference"
- name: contract_id
value: "{{steps.call-create-contract.outputs.parameters.contract-id}}"
- name: csp_id
value: "{{steps.call-create-contract.outputs.parameters.csp-id}}"
- name: stack_template_id
value: "{{workflow.parameters.stack_template_id}}"
- name: organization_id
value: "{{workflow.parameters.organization_id}}"
- name: cloud_account_id
value: "{{workflow.parameters.cloud_account_id}}"
- name: creator
value: ""
- name: description
Expand All @@ -74,17 +64,17 @@ spec:
value: "{{steps.call-create-usercluster.outputs.parameters.cluster-id}}"
- name: sonobuoy_mode
value: "quick"
- - name: call-create-service-for-LMA-1st
- - name: call-create-appgroup-for-LMA-1st
templateRef:
name: tks-cli
template: create-service
template: create-appgroup
arguments:
parameters:
- name: tks_client_conf
value: "{{steps.call-create-tks-client-conf.outputs.parameters.tks_client_conf}}"
- name: cluster_id
value: "{{steps.call-create-usercluster.outputs.parameters.cluster-id}}"
- name: service_name
- name: name
value: "LMA"
- name: type
value: "LMA"
- name: creator
value: ""
Expand All @@ -98,17 +88,17 @@ spec:
parameters:
- name: cluster_id
value: "{{steps.call-create-usercluster.outputs.parameters.cluster-id}}"
- - name: call-create-service-for-SERVICEMESH-1st
- - name: call-create-appgroup-for-SERVICEMESH-1st
templateRef:
name: tks-cli
template: create-service
template: create-appgroup
arguments:
parameters:
- name: tks_client_conf
value: "{{steps.call-create-tks-client-conf.outputs.parameters.tks_client_conf}}"
- name: cluster_id
value: "{{steps.call-create-usercluster.outputs.parameters.cluster-id}}"
- name: service_name
- name: name
value: "SERVICE_MESH"
- name: type
value: "SERVICE_MESH"
- name: creator
value: ""
Expand All @@ -122,45 +112,41 @@ spec:
parameters:
- name: cluster_id
value: "{{steps.call-create-usercluster.outputs.parameters.cluster-id}}"
- - name: call-delete-service-for-SERVICEMESH-1st
- - name: call-delete-appgroup-for-SERVICEMESH-1st
templateRef:
name: tks-cli
template: delete-service
template: delete-appgroup
arguments:
parameters:
- name: tks_client_conf
value: "{{steps.call-create-tks-client-conf.outputs.parameters.tks_client_conf}}"
- name: cluster_id
value: "{{steps.call-create-usercluster.outputs.parameters.cluster-id}}"
- name: service_name
- name: name
value: "SERVICE_MESH"
- name: svc_id
value: "{{steps.call-create-service-for-SERVICEMESH-1st.outputs.parameters.svc_id}}"
- - name: call-delete-service-for-LMA-1st
- name: appgroup_id
value: "{{steps.call-create-appgroup-for-SERVICEMESH-1st.outputs.parameters.appgroup_id}}"
- - name: call-delete-appgroup-for-LMA-1st
templateRef:
name: tks-cli
template: delete-service
template: delete-appgroup
arguments:
parameters:
- name: tks_client_conf
value: "{{steps.call-create-tks-client-conf.outputs.parameters.tks_client_conf}}"
- name: cluster_id
value: "{{steps.call-create-usercluster.outputs.parameters.cluster-id}}"
- name: service_name
- name: name
value: "LMA"
- name: svc_id
value: "{{steps.call-create-service-for-LMA-1st.outputs.parameters.svc_id}}"
- - name: call-create-service-for-LMA-2nd
- name: appgroup_id
value: "{{steps.call-create-appgroup-for-LMA-1st.outputs.parameters.appgroup_id}}"
- - name: call-create-appgroup-for-LMA-2nd
templateRef:
name: tks-cli
template: create-service
template: create-appgroup
arguments:
parameters:
- name: tks_client_conf
value: "{{steps.call-create-tks-client-conf.outputs.parameters.tks_client_conf}}"
- name: cluster_id
value: "{{steps.call-create-usercluster.outputs.parameters.cluster-id}}"
- name: service_name
- name: name
value: "LMA"
- name: type
value: "LMA"
- name: creator
value: ""
Expand All @@ -174,17 +160,17 @@ spec:
parameters:
- name: cluster_id
value: "{{steps.call-create-usercluster.outputs.parameters.cluster-id}}"
- - name: call-create-service-for-SERVICEMESH-2nd
- - name: call-create-appgroup-for-SERVICEMESH-2nd
templateRef:
name: tks-cli
template: create-service
template: create-appgroup
arguments:
parameters:
- name: tks_client_conf
value: "{{steps.call-create-tks-client-conf.outputs.parameters.tks_client_conf}}"
- name: cluster_id
value: "{{steps.call-create-usercluster.outputs.parameters.cluster-id}}"
- name: service_name
- name: name
value: "SERVICE_MESH"
- name: type
value: "SERVICE_MESH"
- name: creator
value: ""
Expand All @@ -198,46 +184,40 @@ spec:
parameters:
- name: cluster_id
value: "{{steps.call-create-usercluster.outputs.parameters.cluster-id}}"
- - name: call-delete-service-for-SERVICEMESH-2nd
- - name: call-delete-appgroup-for-SERVICEMESH-2nd
templateRef:
name: tks-cli
template: delete-service
template: delete-appgroup
arguments:
parameters:
- name: tks_client_conf
value: "{{steps.call-create-tks-client-conf.outputs.parameters.tks_client_conf}}"
- name: cluster_id
value: "{{steps.call-create-usercluster.outputs.parameters.cluster-id}}"
- name: service_name
- name: name
value: "SERVICE_MESH"
- name: svc_id
value: "{{steps.call-create-service-for-SERVICEMESH-2nd.outputs.parameters.svc_id}}"
- - name: call-delete-service-for-LMA-2nd
- name: appgroup_id
value: "{{steps.call-create-appgroup-for-SERVICEMESH-2nd.outputs.parameters.appgroup_id}}"
- - name: call-delete-appgroup-for-LMA-2nd
templateRef:
name: tks-cli
template: delete-service
template: delete-appgroup
arguments:
parameters:
- name: tks_client_conf
value: "{{steps.call-create-tks-client-conf.outputs.parameters.tks_client_conf}}"
- name: cluster_id
value: "{{steps.call-create-usercluster.outputs.parameters.cluster-id}}"
- name: service_name
- name: name
value: "LMA"
- name: svc_id
value: "{{steps.call-create-service-for-LMA-2nd.outputs.parameters.svc_id}}"
- name: appgroup_id
value: "{{steps.call-create-appgroup-for-LMA-2nd.outputs.parameters.appgroup_id}}"
- - name: call-delete-usercluster
templateRef:
name: tks-cli
template: delete-usercluster
arguments:
parameters:
- name: tks_client_conf
value: "{{steps.call-create-tks-client-conf.outputs.parameters.tks_client_conf}}"
- name: cluster_id
value: "{{steps.call-create-usercluster.outputs.parameters.cluster-id}}"
- name: contract_id
value: "{{steps.call-create-contract.outputs.parameters.contract-id}}"
- name: organization_id
value: "{{workflow.parameters.organization_id}}"
# TODO: cleaup remaining AWS resources

- name: notify-slack
Expand Down
Loading

0 comments on commit fafd58a

Please sign in to comment.