osbuild2: extend chrony stage with leapsectz property
Add support for specifying the `leapsectz` property of `org.osbuild.chrony` stage. Modify stage tests to test setting of the value. Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
parent
6c32ff048a
commit
a2ecf46e04
2 changed files with 3 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ import (
|
||||||
type ChronyStageOptions struct {
|
type ChronyStageOptions struct {
|
||||||
Timeservers []string `json:"timeservers,omitempty"`
|
Timeservers []string `json:"timeservers,omitempty"`
|
||||||
Servers []ChronyConfigServer `json:"servers,omitempty"`
|
Servers []ChronyConfigServer `json:"servers,omitempty"`
|
||||||
|
LeapsecTz *string `json:"leapsectz,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ChronyStageOptions) isStageOptions() {}
|
func (ChronyStageOptions) isStageOptions() {}
|
||||||
|
|
|
||||||
|
|
@ -129,10 +129,11 @@ func TestStage_UnmarshalJSON(t *testing.T) {
|
||||||
Hostname: "ntp.example.com",
|
Hostname: "ntp.example.com",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
LeapsecTz: common.StringToPtr(""),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
args: args{
|
args: args{
|
||||||
data: []byte(`{"type":"org.osbuild.chrony","options":{"servers":[{"hostname":"127.0.0.1","minpoll":0,"maxpoll":4,"iburst":true,"prefer":false},{"hostname":"ntp.example.com"}]}}`),
|
data: []byte(`{"type":"org.osbuild.chrony","options":{"servers":[{"hostname":"127.0.0.1","minpoll":0,"maxpoll":4,"iburst":true,"prefer":false},{"hostname":"ntp.example.com"}],"leapsectz":""}}`),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue