treat empty jobs & empty YAML as valid & ship empty jobs in deb/rpm (#788)

fixes https://github.com/zrepl/zrepl/issues/784
obsoletes https://github.com/zrepl/zrepl/pull/787
This commit is contained in:
Christian Schwarz
2024-05-14 19:18:22 +02:00
committed by GitHub
parent 830536715e
commit 9c63736489
5 changed files with 30 additions and 28 deletions
+1 -9
View File
@@ -2,16 +2,8 @@ package config
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestConfigEmptyFails(t *testing.T) {
conf, err := testConfig(t, "\n")
assert.Nil(t, conf)
assert.Error(t, err)
}
func TestJobsOnlyWorks(t *testing.T) {
testValidConfig(t, `
jobs:
@@ -34,7 +26,7 @@ jobs:
keep_sender:
- type: not_replicated
keep_receiver:
- type: last_n
- type: last_n
count: 1
`)
}