feat: System api (#3461)

* feat: start system api

* feat: remove auth

* feat: change gitignore

* feat: run system api

* feat: remove clear view form admin api

* feat: search instances

* feat: add instance

* fix: set primary domain

* Update .gitignore

* fix: add instance

* fix: add instance

* fix: handle errors

* fix: handle instance name

* fix: test

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
Fabi
2022-04-21 12:37:39 +02:00
committed by GitHub
parent a7816a43b1
commit 3d5891eb11
40 changed files with 1216 additions and 485 deletions

View File

@@ -34,6 +34,7 @@ func Test_InstancePrepares(t *testing.T) {
want: want{
sqlExpectations: mockQueries(
regexp.QuoteMeta(`SELECT projections.instances.id,`+
` projections.instances.creation_date,`+
` projections.instances.change_date,`+
` projections.instances.sequence,`+
` projections.instances.global_org_id,`+
@@ -64,6 +65,7 @@ func Test_InstancePrepares(t *testing.T) {
want: want{
sqlExpectations: mockQuery(
regexp.QuoteMeta(`SELECT projections.instances.id,`+
` projections.instances.creation_date,`+
` projections.instances.change_date,`+
` projections.instances.sequence,`+
` projections.instances.global_org_id,`+
@@ -76,6 +78,7 @@ func Test_InstancePrepares(t *testing.T) {
` FROM projections.instances`),
[]string{
"id",
"creation_date",
"change_date",
"sequence",
"global_org_id",
@@ -89,6 +92,7 @@ func Test_InstancePrepares(t *testing.T) {
[]driver.Value{
"id",
testNow,
testNow,
uint64(20211108),
"global-org-id",
"project-id",
@@ -102,6 +106,7 @@ func Test_InstancePrepares(t *testing.T) {
},
object: &Instance{
ID: "id",
CreationDate: testNow,
ChangeDate: testNow,
Sequence: 20211108,
GlobalOrgID: "global-org-id",
@@ -121,6 +126,7 @@ func Test_InstancePrepares(t *testing.T) {
want: want{
sqlExpectations: mockQueryErr(
regexp.QuoteMeta(`SELECT projections.instances.id,`+
` projections.instances.creation_date,`+
` projections.instances.change_date,`+
` projections.instances.sequence,`+
` projections.instances.global_org_id,`+