(t *testing.T)
| 88 | } |
| 89 | |
| 90 | func TestParseOrganizationClaims(t *testing.T) { |
| 91 | t.Parallel() |
| 92 | |
| 93 | t.Run("AGPL", func(t *testing.T) { |
| 94 | t.Parallel() |
| 95 | |
| 96 | // AGPL has limited behavior |
| 97 | s := idpsync.NewAGPLSync(slogtest.Make(t, &slogtest.Options{}), |
| 98 | runtimeconfig.NewManager(), |
| 99 | idpsync.DeploymentSyncSettings{ |
| 100 | OrganizationField: "orgs", |
| 101 | OrganizationMapping: map[string][]uuid.UUID{ |
| 102 | "random": {uuid.New()}, |
| 103 | }, |
| 104 | OrganizationAssignDefault: false, |
| 105 | }) |
| 106 | |
| 107 | ctx := testutil.Context(t, testutil.WaitMedium) |
| 108 | |
| 109 | params, err := s.ParseOrganizationClaims(ctx, jwt.MapClaims{}) |
| 110 | require.Nil(t, err) |
| 111 | |
| 112 | require.False(t, params.SyncEntitled) |
| 113 | }) |
| 114 | } |
| 115 | |
| 116 | func TestSyncOrganizations(t *testing.T) { |
| 117 | t.Parallel() |
nothing calls this directly
no test coverage detected