Skip to content

Commit

Permalink
test: drop x509 error skipping
Browse files Browse the repository at this point in the history
  • Loading branch information
chrischdi committed Apr 15, 2024
1 parent df3f45b commit 50b8cc5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
13 changes: 2 additions & 11 deletions test/e2e/clusterctl_upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,6 @@ func ClusterctlUpgradeSpec(ctx context.Context, inputGetter func() ClusterctlUpg
return err
}, "3m", "30s").ShouldNot(HaveOccurred(), "MachineList should be available after the upgrade")

var lastErr error
// After the upgrade check that there were no unexpected rollouts.
Byf("[%d] Verify there are no unexpected rollouts", i)
Consistently(func() bool {
Expand All @@ -577,23 +576,15 @@ func ClusterctlUpgradeSpec(ctx context.Context, inputGetter func() ClusterctlUpg
Version: coreCAPIStorageVersion,
Kind: "MachineList",
})
lastErr = managementClusterProxy.GetClient().List(
err = managementClusterProxy.GetClient().List(
ctx,
postUpgradeMachineList,
client.InNamespace(workloadCluster.GetNamespace()),
client.MatchingLabels{clusterv1.ClusterNameLabel: workloadCluster.GetName()},
)

if lastErr != nil && strings.Contains(lastErr.Error(), "x509: certificate signed by unknown authority") {
// If we have a x509 error from cert-manager, ignore it.
// We will check afterwards that the last iteration of this Consistently
// had not been an error case.
}
Expect(lastErr).ToNot(HaveOccurred())
Expect(err).ToNot(HaveOccurred())
return validateMachineRollout(preUpgradeMachineList, postUpgradeMachineList)
}, "3m", "30s").Should(BeTrue(), "Machines should remain the same after the upgrade")
// Check again that the last execution inside Consistently had been successful.
Expect(lastErr).ToNot(HaveOccurred())

// Scale up to 2 and back down to 1 so we can repeat this multiple times.
Byf("[%d] Scale MachineDeployment to ensure the providers work", i)
Expand Down
4 changes: 0 additions & 4 deletions test/framework/ownerreference_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"fmt"
"reflect"
"sort"
"strings"
"time"

. "github.com/onsi/gomega"
Expand Down Expand Up @@ -116,9 +115,6 @@ func AssertOwnerReferences(namespace, kubeconfigPath string, assertFuncs ...map[
// Sometimes the conversion-webhooks are not ready yet / cert-managers ca-injector
// may not yet have injected the new ca bundle after the upgrade.
// If this is the case we return an error to retry.
if err != nil && strings.Contains(err.Error(), "x509: certificate signed by unknown authority") {
return err
}
Expect(err).ToNot(HaveOccurred())
for _, v := range graph {
if _, ok := allAssertFuncs[v.Object.Kind]; !ok {
Expand Down

0 comments on commit 50b8cc5

Please sign in to comment.