MSP-5186 Rename Service to AppGroup (without update controller and service names and endpoints)
This commit is contained in:
1 parent
d012a022d8
commit
42b0dbd0dc
22 files changed
+230
-177
No files matched your search
@@ -1,8 +1,9 @@
|
||||
package tests_test
|
||||
|
||||
import (
|
||||
"github.com/txix-open/isp-kit/test/dbt"
|
||||
"isp-system-service/entity"
|
||||
|
||||
"github.com/txix-open/isp-kit/test/dbt"
|
||||
)
|
||||
|
||||
func InsertDomain(db *dbt.TestDb, value entity.Domain) {
|
||||
@@ -15,9 +16,9 @@ func InsertDomain(db *dbt.TestDb, value entity.Domain) {
|
||||
db.Must().ExecNamed(q, value)
|
||||
}
|
||||
|
||||
func InsertService(db *dbt.TestDb, value entity.Service) {
|
||||
func InsertAppGroup(db *dbt.TestDb, value entity.AppGroup) {
|
||||
q := `
|
||||
INSERT INTO service
|
||||
INSERT INTO application_group
|
||||
(id, name, description, domain_id, created_at, updated_at)
|
||||
VALUES
|
||||
(:id, :name, :description, :domain_id, :created_at, :updated_at)
|
||||
@@ -28,9 +29,9 @@ func InsertService(db *dbt.TestDb, value entity.Service) {
|
||||
func InsertApplication(db *dbt.TestDb, value entity.Application) {
|
||||
q := `
|
||||
INSERT INTO application
|
||||
(id, name, description, service_id, created_at, updated_at)
|
||||
(id, name, description, application_group_id, created_at, updated_at)
|
||||
VALUES
|
||||
(:id, :name, :description, :service_id, :created_at, :updated_at)
|
||||
(:id, :name, :description, :application_group_id, :created_at, :updated_at)
|
||||
`
|
||||
db.Must().ExecNamed(q, value)
|
||||
}
|
||||
|
||||
+10
-8
@@ -2,20 +2,22 @@ package tests_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/txix-open/isp-kit/dbx"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/txix-open/isp-kit/dbx"
|
||||
|
||||
"isp-system-service/assembly"
|
||||
"isp-system-service/conf"
|
||||
"isp-system-service/domain"
|
||||
"isp-system-service/entity"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
"github.com/txix-open/isp-kit/grpc/client"
|
||||
"github.com/txix-open/isp-kit/test"
|
||||
"github.com/txix-open/isp-kit/test/dbt"
|
||||
"github.com/txix-open/isp-kit/test/grpct"
|
||||
"isp-system-service/assembly"
|
||||
"isp-system-service/conf"
|
||||
"isp-system-service/domain"
|
||||
"isp-system-service/entity"
|
||||
)
|
||||
|
||||
func TestSecureSuite(t *testing.T) {
|
||||
@@ -44,11 +46,11 @@ func (s *SecureSuite) SetupSuite() {
|
||||
InsertDomain(s.testDb, entity.Domain{
|
||||
Id: 3, Name: "test_domain", SystemId: 1, CreatedAt: createdTime, UpdatedAt: createdTime,
|
||||
})
|
||||
InsertService(s.testDb, entity.Service{
|
||||
Id: 5, Name: "test_service", DomainId: 3, CreatedAt: createdTime, UpdatedAt: createdTime,
|
||||
InsertAppGroup(s.testDb, entity.AppGroup{
|
||||
Id: 5, Name: "test_application_group", DomainId: 3, CreatedAt: createdTime, UpdatedAt: createdTime,
|
||||
})
|
||||
InsertApplication(s.testDb, entity.Application{
|
||||
Id: 7, Name: "test_application", ServiceId: 5, CreatedAt: createdTime, UpdatedAt: createdTime,
|
||||
Id: 7, Name: "test_application", ApplicationGroupId: 5, CreatedAt: createdTime, UpdatedAt: createdTime,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user