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

Test, csc restore do not work properly #2567

Closed
TeddyAndrieux opened this issue May 25, 2020 · 1 comment
Closed

Test, csc restore do not work properly #2567

TeddyAndrieux opened this issue May 25, 2020 · 1 comment
Labels
complexity:easy Something that requires less than a day to fix kind:bug Something isn't working topic:tests What's not tested may be broken

Comments

@TeddyAndrieux
Copy link
Collaborator

Component:

'tests'

What happened:

During CSC test we change the number of replicas (and other stuff) to test the change apply properly and after we restore initial state, but the restore only restore the CSC config map and not the real k8s object.

E.g.: After csc test for Dex we have a clean CM but still have replicas set to 3 in the deployment

[root@metalk8s-24-bootstrap-restore-bootstrap ~]# kubectl get cm -n metalk8s-auth metalk8s-dex-config -o yaml
apiVersion: v1
data:
  config.yaml: |
    apiVersion: addons.metalk8s.scality.com
    kind: DexConfig
    spec: {}
kind: ConfigMap
metadata:
  creationTimestamp: "2020-05-25T09:07:03Z"
  labels:
    app.kubernetes.io/managed-by: salt
    heritage: salt
    metalk8s.scality.com/version: 2.5.1-dev
  name: metalk8s-dex-config
  namespace: metalk8s-auth
  resourceVersion: "16658"
  selfLink: /api/v1/namespaces/metalk8s-auth/configmaps/metalk8s-dex-config
  uid: eeab4b44-d290-4c8f-8fb7-4ef782d78e4b
[root@metalk8s-24-bootstrap-restore-bootstrap ~]# kubectl get deploy -n metalk8s-auth dex -o yaml
apiVersion: apps/v1
kind: Deployment
metadata:
[...]
  name: dex
  namespace: metalk8s-auth
[...]
spec:
  [...]
  replicas: 3
[...]

What was expected:

Restoring properly the k8s object in our test

Steps to reproduce

Run CSC test

Resolution proposal (optional):

Call the salt state during restore_csc in pytest

@TeddyAndrieux TeddyAndrieux added kind:bug Something isn't working topic:tests What's not tested may be broken complexity:easy Something that requires less than a day to fix labels May 25, 2020
@TeddyAndrieux
Copy link
Collaborator Author

Fixed by #2570

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity:easy Something that requires less than a day to fix kind:bug Something isn't working topic:tests What's not tested may be broken
Projects
None yet
Development

No branches or pull requests

1 participant