MSP-3428 CRUD application_group, service -> application_group
This commit is contained in:
1 parent
7108122102
commit
bef400d0d9
26 files changed
+559
-395
No files matched your search
@@ -15,9 +15,9 @@ func InsertDomain(db *dbt.TestDb, value entity.Domain) {
|
||||
db.Must().ExecNamed(q, value)
|
||||
}
|
||||
|
||||
func InsertService(db *dbt.TestDb, value entity.Service) {
|
||||
func InsertApplicationGroup(db *dbt.TestDb, value entity.ApplicationGroup) {
|
||||
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,7 +28,7 @@ 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)
|
||||
`
|
||||
|
||||
+11
-11
@@ -54,11 +54,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,
|
||||
InsertApplicationGroup(s.testDb, entity.ApplicationGroup{
|
||||
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,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -79,10 +79,10 @@ func (s *SecureSuite) TestAuthenticate_Success() {
|
||||
Authenticated: true,
|
||||
ErrorReason: "",
|
||||
AuthData: &domain.AuthData{
|
||||
SystemId: 1,
|
||||
DomainId: 3,
|
||||
ServiceId: 5,
|
||||
ApplicationId: 7,
|
||||
SystemId: 1,
|
||||
DomainId: 3,
|
||||
ApplicationGroupId: 5,
|
||||
ApplicationId: 7,
|
||||
},
|
||||
}, result)
|
||||
}
|
||||
@@ -120,10 +120,10 @@ func (s *SecureSuite) TestAuthenticate_NotExpired() {
|
||||
Authenticated: true,
|
||||
ErrorReason: "",
|
||||
AuthData: &domain.AuthData{
|
||||
SystemId: 1,
|
||||
DomainId: 3,
|
||||
ServiceId: 5,
|
||||
ApplicationId: 7,
|
||||
SystemId: 1,
|
||||
DomainId: 3,
|
||||
ApplicationGroupId: 5,
|
||||
ApplicationId: 7,
|
||||
},
|
||||
}, result)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user