Skip to content

e2e: add coordinator test#2248

Merged
burgerdev merged 1 commit intomainfrom
dav/e2e-coordinator
Mar 26, 2026
Merged

e2e: add coordinator test#2248
burgerdev merged 1 commit intomainfrom
dav/e2e-coordinator

Conversation

@davidweisse
Copy link
Copy Markdown
Member

@davidweisse davidweisse commented Mar 11, 2026

Adds an E2E test specifically for Coordinator related tasks where we don't need a full OpenSSL deployment but only the runtime and the Coordinator. For now, this includes testing atomic manifest updates and config map recovery.

@davidweisse davidweisse requested a review from burgerdev March 11, 2026 15:11
@davidweisse davidweisse added the no changelog PRs not listed in the release notes label Mar 11, 2026
Copy link
Copy Markdown
Member

@burgerdev burgerdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

Comment thread e2e/coordinator/coordinator_test.go Outdated
@@ -0,0 +1,113 @@
// Copyright 2025 Edgeless Systems GmbH
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Copyright 2025 Edgeless Systems GmbH
// Copyright 2026 Edgeless Systems GmbH

Comment thread e2e/coordinator/coordinator_test.go Outdated
unstructured, err := kuberesource.ResourcesToUnstructured(resources)
require.NoError(err)

// Restart whole statefulset so the owned configmap store is also deleted.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Restart whole statefulset so the owned configmap store is also deleted.
// Delete whole statefulset so the owned configmap store is also deleted.

Comment thread e2e/coordinator/coordinator_test.go Outdated
// Wait until all objects are deleted before applying the resources again,
// otherwise some resources may be deleted after being reapplied.
require.NoError(ct.Kubeclient.WaitForDeletion(ctx, unstructured...))
ct.Apply(t)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ct.Apply(t)
require.True(t.Run("apply resources after deleting them", ct.Apply), "Kubernetes resources need to be applied for subsequent tests")

Comment thread e2e/coordinator/coordinator_test.go Outdated
require.NoError(err)
require.NoError(ct.Kubeclient.Apply(ctx, historyUnstructured...))

ct.Recover(t)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ct.Recover(t)
t.Run("recover after restoring configmaps", ct.Recover)

Comment thread e2e/coordinator/coordinator_test.go Outdated
Comment on lines +91 to +104
require.NoError(ct.RunSet(ctx, "--atomic"))

require.True(t.Run("verify", ct.Verify), "contrast verify needs to succeed for subsequent tests")

require.NoError(ct.RunSet(ctx, "--atomic"))

// Second set manifest does not have the correct latest transition hash.
require.ErrorContains(ct.RunSet(ctx, "--atomic"), "does not match latest state")

// Normal set manifest should still work.
require.NoError(ct.RunSet(ctx))

require.NoError(ct.RunVerify(ctx))
require.NoError(ct.RunSet(ctx, "--atomic"))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a negative and a positive test for an explicit transition flag?

@davidweisse davidweisse force-pushed the dav/e2e-coordinator branch from d30bfbb to 1c9f410 Compare March 16, 2026 11:09
Base automatically changed from dav/config-map-recovery to main March 16, 2026 14:24
@burgerdev burgerdev force-pushed the dav/e2e-coordinator branch from 1c9f410 to 09fc5d1 Compare March 24, 2026 14:37
@burgerdev burgerdev merged commit 1961914 into main Mar 26, 2026
16 of 18 checks passed
@burgerdev burgerdev deleted the dav/e2e-coordinator branch March 26, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog PRs not listed in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants