kubediff icon indicating copy to clipboard operation
kubediff copied to clipboard

Add end to end test

Open dholbach opened this issue 3 years ago • 3 comments

Bring up a kind cluster, apply manifests, do cluster-local change, confirm drift using kubediff.

dholbach avatar Sep 24 '21 09:09 dholbach

Potentially re-use some of the work from kured:

  • https://github.com/weaveworks/kured/blob/main/.github/workflows/on-pr.yaml#L93
  • https://github.com/weaveworks/kured/tree/main/tests/kind

dholbach avatar Sep 24 '21 09:09 dholbach

Tested https://github.com/helm/kind-action in a personal repository. We will add to the solution ASAP

imjoseangel avatar Oct 01 '21 08:10 imjoseangel

@dholbach

I'm going to apply the following changes in a first stage. Then I will improve with different scenarios. I think this is going to be a long one 🤣

apiVersion: apps/v1
kind: Deployment
metadata:
  name: kubediff-app
spec:
  replicas: 1
  revisionHistoryLimit: 3
  selector:
    matchLabels:
      app: kubediff-app
  template:
    metadata:
      labels:
        app: kubediff-app
    spec:
      containers:
      - command:
        - sleep
        - infinity
        image: busybox
        name: kubediff-app
        resources:
          limits:
            cpu: 100m
            memory: 100Mi
          requests:
            cpu: 100m
            memory: 100Mi

Change replicas to 3

Run kubediff

Get

## kubediff/kubediff-app (Deployment.v1.apps)

.spec.replicas: '1' != '3'

and

{
  "deployment.yaml": [
    ".spec.replicas: '1' != '3'"
  ]
}

imjoseangel avatar Oct 08 '21 16:10 imjoseangel