mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 11:03:34 +00:00
fix: spec validation when name is empty, race in e2e tests
This commit is contained in:
@@ -337,7 +337,7 @@ func (d *Deployment) Validate(ctx context.Context) error {
|
||||
return fmt.Errorf("invalid service spec: %w", err)
|
||||
}
|
||||
|
||||
if d.Service == nil {
|
||||
if d.Service == nil && d.Spec.Name != "" {
|
||||
svc, err := d.cli.InspectService(ctx, d.Spec.Name)
|
||||
if err == nil {
|
||||
d.Service = &svc
|
||||
|
||||
Reference in New Issue
Block a user