mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-11-30 02:38:17 +08:00
[REV] support set service PublishNotReadyAddresses for statefulset
This commit is contained in:
parent
ddaa80a62d
commit
e9d11918ce
@ -158,6 +158,14 @@ func TestGetMem(t *testing.T) {
|
||||
// }
|
||||
}
|
||||
|
||||
func TestCockroachDBCreateTable(t *testing.T) {
|
||||
if err := CreateManager(dbconfig.Config{
|
||||
MysqlConnectionInfo: "postgresql://root@localhost:5432/region?sslmode=disable",
|
||||
DBType: "cockroachdb",
|
||||
}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
func TestCockroachDBCreateService(t *testing.T) {
|
||||
if err := CreateManager(dbconfig.Config{
|
||||
MysqlConnectionInfo: "postgresql://root@localhost:5432/region?sslmode=disable",
|
||||
@ -165,7 +173,7 @@ func TestCockroachDBCreateService(t *testing.T) {
|
||||
}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
err := GetManager().TenantServiceDao().AddModel(&model.TenantServices{
|
||||
err := GetManager().TenantServiceDeleteDao().AddModel(&model.TenantServicesDelete{
|
||||
TenantID: "asdasd",
|
||||
ServiceID: "asdasdasdasd",
|
||||
ServiceAlias: "grasdasdasdads",
|
||||
@ -205,3 +213,16 @@ func TestCockroachDBSaveDeployInfo(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestCockroachDBDeleteDeployInfo(t *testing.T) {
|
||||
if err := CreateManager(dbconfig.Config{
|
||||
MysqlConnectionInfo: "postgresql://root@localhost:5432/region?sslmode=disable",
|
||||
DBType: "cockroachdb",
|
||||
}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
err := GetManager().K8sDeployReplicationDao().DeleteK8sDeployReplication("asdasdadsasdasdasd")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
@ -278,5 +278,6 @@ func (k *K8sServiceBuild) createStatefulService(ports []*model.TenantServicesPor
|
||||
ClusterIP: "None",
|
||||
}
|
||||
service.Spec = spec
|
||||
service.Annotations = map[string]string{"service.alpha.kubernetes.io/tolerate-unready-endpoints": "true"}
|
||||
return &service
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user