summaryrefslogtreecommitdiff
path: root/experimental/embed/embed_test.go
diff options
context:
space:
mode:
authorJames Elliott <james-d-elliott@users.noreply.github.com>2025-03-09 01:53:44 +1100
committerGitHub <noreply@github.com>2025-03-09 01:53:44 +1100
commit9241731a4dd5592b4a02b5352c903b4d06b6f4ab (patch)
tree5184b98751912a261ff70fd8721b9cd4f1c98f1e /experimental/embed/embed_test.go
parentbbcb38ab9ff35e69d5d52a71ab56346749f5e8b1 (diff)
feat(embed): make authelia embedable (#8841)
This adds a highly experimental option for developers looking to embed Authelia within another go binary. Closes #5803 Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Diffstat (limited to 'experimental/embed/embed_test.go')
-rw-r--r--experimental/embed/embed_test.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/experimental/embed/embed_test.go b/experimental/embed/embed_test.go
new file mode 100644
index 000000000..c20e2cb77
--- /dev/null
+++ b/experimental/embed/embed_test.go
@@ -0,0 +1,19 @@
+package embed
+
+import (
+ "testing"
+
+ "github.com/stretchr/testify/assert"
+)
+
+func TestShouldPanicNilCtx(t *testing.T) {
+ assert.Panics(t, func() {
+ _ = ProvidersStartupCheck(nil, false)
+ })
+
+ ctx := &ctxEmbed{}
+
+ assert.Panics(t, func() {
+ _ = ProvidersStartupCheck(ctx, false)
+ })
+}