mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:17:32 +00:00
feat(cli): setup (#3267)
* commander * commander * selber! * move to packages * fix(errors): implement Is interface * test: command * test: commands * add init steps * setup tenant * add default step yaml * possibility to set password * merge v2 into v2-commander * fix: rename iam command side to instance * fix: rename iam command side to instance * fix: rename iam command side to instance * fix: rename iam command side to instance * fix: search query builder can filter events in memory * fix: filters for add member * fix(setup): add `ExternalSecure` to config * chore: name iam to instance * fix: matching * remove unsued func * base url * base url * test(command): filter funcs * test: commands * fix: rename orgiampolicy to domain policy * start from init * commands * config * fix indexes and add constraints * fixes * fix: merge conflicts * fix: protos * fix: md files * setup * add deprecated org iam policy again * typo * fix search query * fix filter * Apply suggestions from code review * remove custom org from org setup * add todos for verification * change apps creation * simplify package structure * fix error * move preparation helper for tests * fix unique constraints * fix config mapping in setup * fix error handling in encryption_keys.go * fix projection config * fix query from old views to projection * fix setup of mgmt api * set iam project and fix instance projection * imports Co-authored-by: Livio Amstutz <livio.a@gmail.com> Co-authored-by: fabi <fabienne.gerschwiler@gmail.com>
This commit is contained in:
@@ -30,7 +30,7 @@ func TestInstanceProjection_reduces(t *testing.T) {
|
||||
[]byte(`{"globalOrgId": "orgid"}`),
|
||||
), instance.GlobalOrgSetMapper),
|
||||
},
|
||||
reduce: (&IAMProjection{}).reduceGlobalOrgSet,
|
||||
reduce: (&InstanceProjection{}).reduceGlobalOrgSet,
|
||||
want: wantReduce{
|
||||
projection: InstanceProjectionTable,
|
||||
aggregateType: eventstore.AggregateType("instance"),
|
||||
@@ -39,7 +39,7 @@ func TestInstanceProjection_reduces(t *testing.T) {
|
||||
executer: &testExecuter{
|
||||
executions: []execution{
|
||||
{
|
||||
expectedStmt: "UPSERT INTO projections.instance (id, change_date, sequence, global_org_id) VALUES ($1, $2, $3, $4)",
|
||||
expectedStmt: "UPSERT INTO projections.instances (id, change_date, sequence, global_org_id) VALUES ($1, $2, $3, $4)",
|
||||
expectedArgs: []interface{}{
|
||||
"instance-id",
|
||||
anyArg{},
|
||||
@@ -60,7 +60,7 @@ func TestInstanceProjection_reduces(t *testing.T) {
|
||||
[]byte(`{"iamProjectId": "project-id"}`),
|
||||
), instance.ProjectSetMapper),
|
||||
},
|
||||
reduce: (&IAMProjection{}).reduceIAMProjectSet,
|
||||
reduce: (&InstanceProjection{}).reduceIAMProjectSet,
|
||||
want: wantReduce{
|
||||
projection: InstanceProjectionTable,
|
||||
aggregateType: eventstore.AggregateType("instance"),
|
||||
@@ -69,7 +69,7 @@ func TestInstanceProjection_reduces(t *testing.T) {
|
||||
executer: &testExecuter{
|
||||
executions: []execution{
|
||||
{
|
||||
expectedStmt: "UPSERT INTO projections.instance (id, change_date, sequence, iam_project_id) VALUES ($1, $2, $3, $4)",
|
||||
expectedStmt: "UPSERT INTO projections.instances (id, change_date, sequence, iam_project_id) VALUES ($1, $2, $3, $4)",
|
||||
expectedArgs: []interface{}{
|
||||
"instance-id",
|
||||
anyArg{},
|
||||
@@ -90,7 +90,7 @@ func TestInstanceProjection_reduces(t *testing.T) {
|
||||
[]byte(`{"language": "en"}`),
|
||||
), instance.DefaultLanguageSetMapper),
|
||||
},
|
||||
reduce: (&IAMProjection{}).reduceDefaultLanguageSet,
|
||||
reduce: (&InstanceProjection{}).reduceDefaultLanguageSet,
|
||||
want: wantReduce{
|
||||
projection: InstanceProjectionTable,
|
||||
aggregateType: eventstore.AggregateType("instance"),
|
||||
@@ -99,7 +99,7 @@ func TestInstanceProjection_reduces(t *testing.T) {
|
||||
executer: &testExecuter{
|
||||
executions: []execution{
|
||||
{
|
||||
expectedStmt: "UPSERT INTO projections.instance (id, change_date, sequence, default_language) VALUES ($1, $2, $3, $4)",
|
||||
expectedStmt: "UPSERT INTO projections.instances (id, change_date, sequence, default_language) VALUES ($1, $2, $3, $4)",
|
||||
expectedArgs: []interface{}{
|
||||
"instance-id",
|
||||
anyArg{},
|
||||
@@ -120,7 +120,7 @@ func TestInstanceProjection_reduces(t *testing.T) {
|
||||
[]byte(`{"Step": 1}`),
|
||||
), instance.SetupStepMapper),
|
||||
},
|
||||
reduce: (&IAMProjection{}).reduceSetupEvent,
|
||||
reduce: (&InstanceProjection{}).reduceSetupEvent,
|
||||
want: wantReduce{
|
||||
projection: InstanceProjectionTable,
|
||||
aggregateType: eventstore.AggregateType("instance"),
|
||||
@@ -129,7 +129,7 @@ func TestInstanceProjection_reduces(t *testing.T) {
|
||||
executer: &testExecuter{
|
||||
executions: []execution{
|
||||
{
|
||||
expectedStmt: "UPSERT INTO projections.instance (id, change_date, sequence, setup_started) VALUES ($1, $2, $3, $4)",
|
||||
expectedStmt: "UPSERT INTO projections.instances (id, change_date, sequence, setup_started) VALUES ($1, $2, $3, $4)",
|
||||
expectedArgs: []interface{}{
|
||||
"instance-id",
|
||||
anyArg{},
|
||||
@@ -150,7 +150,7 @@ func TestInstanceProjection_reduces(t *testing.T) {
|
||||
[]byte(`{"Step": 1}`),
|
||||
), instance.SetupStepMapper),
|
||||
},
|
||||
reduce: (&IAMProjection{}).reduceSetupEvent,
|
||||
reduce: (&InstanceProjection{}).reduceSetupEvent,
|
||||
want: wantReduce{
|
||||
projection: InstanceProjectionTable,
|
||||
aggregateType: eventstore.AggregateType("instance"),
|
||||
@@ -159,7 +159,7 @@ func TestInstanceProjection_reduces(t *testing.T) {
|
||||
executer: &testExecuter{
|
||||
executions: []execution{
|
||||
{
|
||||
expectedStmt: "UPSERT INTO projections.instance (id, change_date, sequence, setup_done) VALUES ($1, $2, $3, $4)",
|
||||
expectedStmt: "UPSERT INTO projections.instances (id, change_date, sequence, setup_done) VALUES ($1, $2, $3, $4)",
|
||||
expectedArgs: []interface{}{
|
||||
"instance-id",
|
||||
anyArg{},
|
||||
|
Reference in New Issue
Block a user