mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 00:49:03 +00:00
For #27281 This PR adds `/api/{version}/fleet/scim/details` endpoint, along with some frontend fixes. # Checklist for submitter - [x] If database migrations are included, checked table schema to confirm autoupdate - For database migrations: - [x] Checked schema for all modified table for columns that will auto-update timestamps during migration. - [x] Confirmed that updating the timestamps is acceptable, and will not cause unwanted side effects. - [x] Ensured the correct collation is explicitly set for character columns (`COLLATE utf8mb4_unicode_ci`). - [x] Added/updated automated tests - [x] A detailed QA plan exists on the associated ticket (if it isn't there, work with the product group's QA engineer to add it) - [x] Manual QA for all new/changed functionality
48 lines
1.1 KiB
Go
48 lines
1.1 KiB
Go
package scim
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
|
|
"github.com/fleetdm/fleet/v4/server/fleet"
|
|
"github.com/fleetdm/fleet/v4/server/service"
|
|
"github.com/fleetdm/fleet/v4/server/service/integrationtest"
|
|
"github.com/go-kit/log"
|
|
)
|
|
|
|
type Suite struct {
|
|
integrationtest.BaseSuite
|
|
}
|
|
|
|
func SetUpSuite(t *testing.T, uniqueTestName string) *Suite {
|
|
// Note: t.Parallel() is called when MySQL datastore options are processed
|
|
license := &fleet.LicenseInfo{
|
|
Tier: fleet.TierPremium,
|
|
}
|
|
ds, redisPool, fleetCfg, fleetSvc, ctx := integrationtest.SetUpMySQLAndRedisAndService(t, uniqueTestName, &service.TestServerOpts{
|
|
License: license,
|
|
})
|
|
logger := log.NewLogfmtLogger(os.Stdout)
|
|
users, server := service.RunServerForTestsWithServiceWithDS(t, ctx, ds, fleetSvc, &service.TestServerOpts{
|
|
License: license,
|
|
FleetConfig: &fleetCfg,
|
|
Pool: redisPool,
|
|
Logger: logger,
|
|
EnableSCIM: true,
|
|
})
|
|
|
|
s := &Suite{
|
|
BaseSuite: integrationtest.BaseSuite{
|
|
Logger: logger,
|
|
DS: ds,
|
|
FleetCfg: fleetCfg,
|
|
Users: users,
|
|
Server: server,
|
|
},
|
|
}
|
|
|
|
integrationtest.SetUpServerURL(t, ds, server)
|
|
|
|
s.Token = s.GetTestAdminToken(t)
|
|
return s
|
|
}
|