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

End-to-end (e2e) integration test for customizing BTP Manager input secret #921

Closed
3 tasks done
PK85 opened this issue Dec 11, 2024 · 1 comment · Fixed by #935
Closed
3 tasks done

End-to-end (e2e) integration test for customizing BTP Manager input secret #921

PK85 opened this issue Dec 11, 2024 · 1 comment · Fixed by #935
Assignees
Labels
kind/enhancement Categorizes issue or PR as related to modifying or improving an existing feature

Comments

@PK85
Copy link
Contributor

PK85 commented Dec 11, 2024

Part of: #901

AC

  • 1) Make sure that changing sap-btp-manager secret: cluster_id, management_namespace, clientid, clientsecret, sm_url, tokenurl is reflected in the btp-operator module and it works correctly
  • 2) Before implementation, present to the Product Owner and the team what that test will look like.
  • 3) Make sure that new tests do not take too much time
@PK85 PK85 changed the title End-to-end (e2e) integration test for customizing BTP Manager input secret. End-to-end (e2e) integration test for customizing BTP Manager input secret Dec 11, 2024
@szwedm szwedm self-assigned this Dec 11, 2024
@szwedm
Copy link
Contributor

szwedm commented Dec 16, 2024

Proposal

Summary

Test form: shell script
Run environment: GA workflow
When to run: release, on-demand, PR
Test scenario:

  1. Deploy sap-btp-manager secret.
  2. Deploy BTP Manager.
  3. Wait for SAP BTP service operator readiness.
  4. Add management_namespace field and change all other fields in sap-btp-manager secret.
  5. Wait a certain time for a reconciliation of SAP BTP service operator (fail on timeout).
    5.1. Check sap-btp-operator-clusterid secret's uid field (changes after recreation).
    5.2. Check sap-btp-service-operator secret's resourceVersion field (changes on update).
    5.3. Check sap-btp-operator-config configmap's resourceVersion field (changes on update).
  6. Compare data between KEB's secret and SAP BTP service operator resources.
  7. Check sap-btp-operator-controller-manager deployment environment variables (references values from secrets and configmap).

Details

sap-btp-manager secret is mutable, but will be reconciled by KEB's runtime-reconciler. Data managed by KEB:

  • clientid
  • clientsecret
  • cluster_id
  • sm_url
  • tokenurl

Extra data to reflect in SAP BTP service operator:

  • management_namespace

SAP BTP service operator resources with fields and sources of data:
a) sap-btp-operator-clusterid secret (created by sap-btp-operator-controller-manager)

  • INITIAL_CLUSTER_ID <- CLUSTER_ID in sap-btp-operator-config configmap

b) sap-btp-service-operator secret

  • clientid <- clientid in sap-btp-manager secret
  • clientsecret <- clientsecret in sap-btp-manager secret
  • cluster_id <- cluster_id in sap-btp-manager secret
  • sm_url <- sm_url in sap-btp-manager secret
  • tokenurl <- tokenurl in sap-btp-manager secret
  • tokenurlsuffix <- hard-coded const

c) sap-btp-operator-config configmap

  • ALLOW_CLUSTER_ACCESS <- chart value
  • CLUSTER_ID <- cluster_id in sap-btp-manager secret
  • ENABLE_LIMITED_CACHE <- chart value
  • MANAGEMENT_NAMESPACE <- management_namespace in sap-btp-manager secret
  • RELEASE_NAMESPACE <- management_namespace in sap-btp-manager secret

The test will fail until the feature is implemented.

@szwedm szwedm added the kind/enhancement Categorizes issue or PR as related to modifying or improving an existing feature label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Categorizes issue or PR as related to modifying or improving an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants