Skip to content

Commit

Permalink
added e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
facchettos committed Apr 8, 2024
1 parent 22ade11 commit 54b4478
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions e2e/plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,14 @@ var _ = ginkgo.Describe("Plugin test", func() {
WithTimeout(pollingDurationLong).
Should(gomega.BeTrue())
})

ginkgo.It("check the interceptor", func() {
// wait for secret to become synced
vPod := &corev1.Pod{}
err := f.VclusterCRClient.Get(f.Context, types.NamespacedName{Name: "stuff", Namespace: "test"}, vPod)
framework.ExpectNoError(err)

// check if secret is synced correctly
framework.ExpectEqual(vPod.Name, "definitelynotstuff")
})
})
1 change: 1 addition & 0 deletions e2e/test_plugin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func main() {
plugin.MustRegister(syncers.NewMyDeploymentSyncer(ctx))
plugin.MustRegister(syncers.NewCarSyncer(ctx))
plugin.MustRegister(syncers.NewImportSecrets(ctx))
plugin.MustRegister(syncers.DummyInterceptor{})
plugin.MustStart()
}

Expand Down

0 comments on commit 54b4478

Please sign in to comment.