Skip to content

Commit 53c2347

Browse files
committed
Finalize e2e tests
1 parent cf245a3 commit 53c2347

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

api/v1alpha1/helmchartproxy_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ type HelmChartProxySpec struct {
8484
// +optional
8585
ReconcileStrategy string `json:"reconcileStrategy,omitempty"`
8686

87+
// TODO (dmvolod) Add notes about release drift description and warning
8788
ReleaseDrift bool `json:"releaseDrift,omitempty"`
8889

8990
// Options represents CLI flags passed to Helm operations (i.e. install, upgrade, delete) and

controllers/helmreleaseproxy/helmreleaseproxy_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ func initializeConditions(ctx context.Context, patchHelper *patch.Helper, helmRe
383383
}
384384

385385
// patchHelmReleaseProxy patches the HelmReleaseProxy object and sets the ReadyCondition as an aggregate of the other condition set.
386-
// TODO: Is this preferrable to client.Update() calls? Based on testing it seems like it avoids race conditions.
386+
// TODO: Is this preferable to client.Update() calls? Based on testing it seems like it avoids race conditions.
387387
func patchHelmReleaseProxy(ctx context.Context, patchHelper *patch.Helper, helmReleaseProxy *addonsv1alpha1.HelmReleaseProxy) error {
388388
conditions.SetSummary(helmReleaseProxy,
389389
conditions.WithConditions(
@@ -507,7 +507,7 @@ func (r *HelmReleaseProxyReconciler) getCACertificateFromSecret(ctx context.Cont
507507
// writeCACertificateToFile writes the CA certificate to a temporary file.
508508
func writeCACertificateToFile(ctx context.Context, caCertificate []byte) (string, error) {
509509
log := ctrl.LoggerFrom(ctx)
510-
log.V(2).Info("Writing CA certficate to file")
510+
log.V(2).Info("Writing CA certificate to file")
511511
caCertFile, err := os.CreateTemp("", "ca-*.crt")
512512
if err != nil {
513513
return "", err

test/e2e/helm_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ var _ = Describe("Workload cluster creation", func() {
220220
})
221221
})
222222

223-
FIt("Install and manage Helm chart with ReleaseDrift option enabled", func() {
223+
It("Install and manage Helm chart with ReleaseDrift option enabled", func() {
224224
clusterName = fmt.Sprintf("%s-%s", specName, util.RandomString(6))
225225
clusterctl.ApplyClusterTemplateAndWait(ctx, createApplyClusterTemplateInput(
226226
specName,
@@ -258,7 +258,7 @@ var _ = Describe("Workload cluster creation", func() {
258258
}
259259

260260
// Create new Helm chart
261-
By("Creating new HelmChartProxy to install nginx", func() {
261+
By("Creating new HelmChartProxy to install hello-world chart", func() {
262262
HelmInstallSpec(ctx, func() HelmInstallInput {
263263
return HelmInstallInput{
264264
BootstrapClusterProxy: bootstrapClusterProxy,
@@ -269,8 +269,8 @@ var _ = Describe("Workload cluster creation", func() {
269269
})
270270
})
271271

272-
// Updating Nginx deployment and waiting for the release drift
273-
By("Updating Nginx deployment and waiting for release drift", func() {
272+
// Updating hello-world deployment and waiting for the release drift
273+
By("Updating hello-world deployment and waiting for release drift", func() {
274274
HelmReleaseDriftWithDeployment(ctx, func() HelmReleaseDriftInput {
275275
return HelmReleaseDriftInput{
276276
BootstrapClusterProxy: bootstrapClusterProxy,
@@ -299,8 +299,8 @@ var _ = Describe("Workload cluster creation", func() {
299299
})
300300
})
301301

302-
// Updating Nginx deployment and waiting for the release drift
303-
By("Updating Nginx deployment and waiting release drift to be inactive for a long time", func() {
302+
// Updating hello-world deployment and waiting for the release drift
303+
By("Updating hello-world deployment and waiting release drift to be inactive for a long time", func() {
304304
HelmReleaseDriftWithDeployment(ctx, func() HelmReleaseDriftInput {
305305
return HelmReleaseDriftInput{
306306
BootstrapClusterProxy: bootstrapClusterProxy,

test/e2e/helpers.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,8 @@ func GetWaitForHelmReleaseProxyReadyInput(ctx context.Context, clusterProxy fram
312312
return errors.Errorf("Non-generated ReleaseName mismatch, got `%s` but HelmChartProxy specifies `%s`", hrp.Spec.ReleaseName, helmChartProxy.Spec.ReleaseName)
313313
case hrp.Spec.ReleaseNamespace != helmChartProxy.Spec.ReleaseNamespace:
314314
return errors.Errorf("ReleaseNamespace mismatch, got `%s` but HelmChartProxy specifies `%s`", hrp.Spec.ReleaseNamespace, helmChartProxy.Spec.ReleaseNamespace)
315+
case hrp.Spec.ReleaseDrift != helmChartProxy.Spec.ReleaseDrift:
316+
return errors.Errorf("ReleaseDrift mismatch, got `%t` but HelmChartProxy specifies `%t`", hrp.Spec.ReleaseDrift, helmChartProxy.Spec.ReleaseDrift)
315317
}
316318

317319
// If we made it past all the checks, then we have the correct HelmReleaseProxy.

0 commit comments

Comments
 (0)