refactor: remove pocketbase (#1138)

This commit is contained in:
Jonas Plum
2025-09-02 21:58:08 +02:00
committed by GitHub
parent f28c238135
commit eba2615ec0
435 changed files with 42677 additions and 4730 deletions

View File

@@ -0,0 +1,61 @@
package testing
import (
"net/http"
"testing"
"github.com/SecurityBrewery/catalyst/app/data"
)
func TestFeaturesConfig(t *testing.T) {
t.Parallel()
testSets := []catalystTest{
{
baseTest: baseTest{
Name: "Config",
Method: http.MethodGet,
URL: "/api/config",
},
userTests: []userTest{
{
Name: "NoAuth",
ExpectedStatus: http.StatusOK,
ExpectedContent: []string{
`"flags":`,
},
},
{
Name: "Analyst",
AuthRecord: data.AnalystEmail,
ExpectedStatus: http.StatusOK,
ExpectedContent: []string{
`"flags":`,
},
},
{
Name: "Admin",
Admin: data.AdminEmail,
ExpectedStatus: http.StatusOK,
ExpectedContent: []string{
`"flags":`,
},
},
},
},
}
for _, testSet := range testSets {
t.Run(testSet.baseTest.Name, func(t *testing.T) {
t.Parallel()
for _, userTest := range testSet.userTests {
t.Run(userTest.Name, func(t *testing.T) {
t.Parallel()
runMatrixTest(t, testSet.baseTest, userTest)
})
}
})
}
}