mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 18:57:32 +00:00
feat: Instance domains (#3444)
* feat: add domain list * feat: domain tests * feat: add redirect url on adding instance domain * Update internal/command/instance_domain.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * feat: remove unused code * fix Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
@@ -31,6 +31,7 @@ func Test_InstanceDomainPrepares(t *testing.T) {
|
||||
` projections.instance_domains.domain,`+
|
||||
` projections.instance_domains.instance_id,`+
|
||||
` projections.instance_domains.is_generated,`+
|
||||
` projections.instance_domains.is_primary,`+
|
||||
` COUNT(*) OVER ()`+
|
||||
` FROM projections.instance_domains`),
|
||||
nil,
|
||||
@@ -50,6 +51,7 @@ func Test_InstanceDomainPrepares(t *testing.T) {
|
||||
` projections.instance_domains.domain,`+
|
||||
` projections.instance_domains.instance_id,`+
|
||||
` projections.instance_domains.is_generated,`+
|
||||
` projections.instance_domains.is_primary,`+
|
||||
` COUNT(*) OVER ()`+
|
||||
` FROM projections.instance_domains`),
|
||||
[]string{
|
||||
@@ -59,6 +61,7 @@ func Test_InstanceDomainPrepares(t *testing.T) {
|
||||
"domain",
|
||||
"instance_id",
|
||||
"is_generated",
|
||||
"is_primary",
|
||||
"count",
|
||||
},
|
||||
[][]driver.Value{
|
||||
@@ -69,6 +72,7 @@ func Test_InstanceDomainPrepares(t *testing.T) {
|
||||
"zitadel.ch",
|
||||
"inst-id",
|
||||
true,
|
||||
true,
|
||||
},
|
||||
},
|
||||
),
|
||||
@@ -85,6 +89,7 @@ func Test_InstanceDomainPrepares(t *testing.T) {
|
||||
Domain: "zitadel.ch",
|
||||
InstanceID: "inst-id",
|
||||
IsGenerated: true,
|
||||
IsPrimary: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -100,6 +105,7 @@ func Test_InstanceDomainPrepares(t *testing.T) {
|
||||
` projections.instance_domains.domain,`+
|
||||
` projections.instance_domains.instance_id,`+
|
||||
` projections.instance_domains.is_generated,`+
|
||||
` projections.instance_domains.is_primary,`+
|
||||
` COUNT(*) OVER ()`+
|
||||
` FROM projections.instance_domains`),
|
||||
[]string{
|
||||
@@ -109,6 +115,7 @@ func Test_InstanceDomainPrepares(t *testing.T) {
|
||||
"domain",
|
||||
"instance_id",
|
||||
"is_generated",
|
||||
"is_primary",
|
||||
"count",
|
||||
},
|
||||
[][]driver.Value{
|
||||
@@ -119,6 +126,7 @@ func Test_InstanceDomainPrepares(t *testing.T) {
|
||||
"zitadel.ch",
|
||||
"inst-id",
|
||||
true,
|
||||
true,
|
||||
},
|
||||
{
|
||||
testNow,
|
||||
@@ -127,6 +135,7 @@ func Test_InstanceDomainPrepares(t *testing.T) {
|
||||
"zitadel.com",
|
||||
"inst-id",
|
||||
false,
|
||||
false,
|
||||
},
|
||||
},
|
||||
),
|
||||
@@ -143,6 +152,7 @@ func Test_InstanceDomainPrepares(t *testing.T) {
|
||||
Domain: "zitadel.ch",
|
||||
InstanceID: "inst-id",
|
||||
IsGenerated: true,
|
||||
IsPrimary: true,
|
||||
},
|
||||
{
|
||||
CreationDate: testNow,
|
||||
@@ -151,6 +161,7 @@ func Test_InstanceDomainPrepares(t *testing.T) {
|
||||
Domain: "zitadel.com",
|
||||
InstanceID: "inst-id",
|
||||
IsGenerated: false,
|
||||
IsPrimary: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -166,6 +177,7 @@ func Test_InstanceDomainPrepares(t *testing.T) {
|
||||
` projections.instance_domains.domain,`+
|
||||
` projections.instance_domains.instance_id,`+
|
||||
` projections.instance_domains.is_generated,`+
|
||||
` projections.instance_domains.is_primary,`+
|
||||
` COUNT(*) OVER ()`+
|
||||
` FROM projections.instance_domains`),
|
||||
sql.ErrConnDone,
|
||||
|
Reference in New Issue
Block a user