mirror of
https://github.com/kairos-io/kairos-sdk.git
synced 2025-09-28 15:35:07 +00:00
VPN env vars is an object (#100)
This commit is contained in:
@@ -62,7 +62,7 @@ func (P2PNetworkExtended) JSONSchemaOneOf() []interface{} {
|
|||||||
|
|
||||||
// VPN represents the vpn block in the Kairos configuration.
|
// VPN represents the vpn block in the Kairos configuration.
|
||||||
type VPN struct {
|
type VPN struct {
|
||||||
Create bool `json:"vpn,omitempty" default:"true"`
|
Create bool `json:"vpn,omitempty" default:"true"`
|
||||||
Use bool `json:"use,omitempty" default:"true"`
|
Use bool `json:"use,omitempty" default:"true"`
|
||||||
Envs []interface{} `json:"env,omitempty"`
|
Envs interface{} `json:"env,omitempty"`
|
||||||
}
|
}
|
||||||
|
@@ -178,4 +178,22 @@ auto:
|
|||||||
Expect(config.IsValid()).To(BeTrue())
|
Expect(config.IsValid()).To(BeTrue())
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Context("vpn", func() {
|
||||||
|
BeforeEach(func() {
|
||||||
|
yaml = `#cloud-config
|
||||||
|
network_token: "b3RwOgogIGRoYWdlX3NpemU6IDIwOTcxNTIwCg=="
|
||||||
|
auto:
|
||||||
|
enable: true
|
||||||
|
ha:
|
||||||
|
enable: true
|
||||||
|
vpn:
|
||||||
|
env:
|
||||||
|
DCHP: "true"`
|
||||||
|
})
|
||||||
|
|
||||||
|
It("succeedes", func() {
|
||||||
|
Expect(config.IsValid()).To(BeTrue())
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user