Skip to content

Commit

Permalink
Add test for multiple portals using the same realm
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-stone committed Mar 18, 2024
1 parent 6af0db7 commit 46e525f
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,41 @@ func TestNewConfig(t *testing.T) {
},
},
},
{
name: "test valid config whan multiple portals have same realm from different identity stores",
identityStores: []*ids.IdentityStoreConfig{
{
Name: "localdb1",
Kind: "local",
Params: map[string]interface{}{
"realm": "local",
"path": filepath.Join(path.Dir(dbPath), "user_db1.json"),
},
},
{
Name: "localdb2",
Kind: "local",
Params: map[string]interface{}{
"realm": "local",
"path": filepath.Join(path.Dir(dbPath), "user_db2.json"),
},
},
},
portals: []*authn.PortalConfig{
{
Name: "myportal1",
IdentityStores: []string{
"localdb1",
},
},
{
Name: "myportal2",
IdentityStores: []string{
"localdb2",
},
},
},
},
}

for _, tc := range testcases {
Expand Down

0 comments on commit 46e525f

Please sign in to comment.