cnoe-io / idpbuilder

Spin up a complete internal developer platform with only Docker required as a dependency.
https://cloud-native.slack.com/archives/C05TN9WFN5S
Apache License 2.0
186 stars 59 forks source link

Fix tests #28

Closed nabuskey closed 1 year ago

nabuskey commented 1 year ago

Currently tests are broken. Need to fix them.

An example failed run https://github.com/cnoe-io/idpbuilder/actions/runs/6532866095/job/17750266601

36

cmoulliard commented 1 year ago

The problem is related to this error registry_test.go:31: Error reconciling registry: Error response from daemon: network kind not found

cmoulliard commented 1 year ago

Controller_test fails as content compared diverges from the existing kind config

/opt/homebrew/opt/go/libexec/bin/go tool test2json -t /Users/cmoullia/Library/Caches/JetBrains/IntelliJIdea2023.2/tmp/GoLand/___cluster_test_go.test -test.v -test.paniconexit0 -test.run ^\QTestGetConfig\E$
=== RUN   TestGetConfig
    cluster_test.go:55: Got config: # two node (one workers) cluster config
        # Kind kubernetes release images https://github.com/kubernetes-sigs/kind/releases
        kind: Cluster
        apiVersion: kind.x-k8s.io/v1alpha4
        containerdConfigPatches:
        - |-
          [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5001"]
            endpoint = ["http://idpbuilder-testcase-registry:5000"]
        nodes:
        - role: control-plane
          image: "kindest/node:v1.26.3"
          kubeadmConfigPatches:
          - |
            kind: InitConfiguration
            nodeRegistration:
              kubeletExtraArgs:
                system-reserved: memory=4Gi
                node-labels: "ingress-ready=true"
          extraPortMappings:
          - containerPort: 80
            hostPort: 8880
            protocol: TCP
          - containerPort: 443
            hostPort: 8443
            protocol: TCP
          -
        - role: worker
          image: "kindest/node:v1.26.3"
          kubeadmConfigPatches:
          - |
            kind: JoinConfiguration
            nodeRegistration:
              kubeletExtraArgs:
                system-reserved: memory=4Gi
cmoulliard commented 1 year ago

Do you plan to create a PR to fix the issues with the test ? @nabuskey I created a commit that you could already include. See: cc922d4

nabuskey commented 1 year ago

Yes, I am documenting issues with tests. I think there are multiple issues with the tests see:

36

37

As for your fix, I would love to see a PR :) @cmoulliard

cmoulliard commented 1 year ago

I will create a draft PR to at least fix the 2 issues I discovered (argo_test.go, cluster_test.go)