VPN env vars is an object (#100)

This commit is contained in:
Mauro Morales
2024-04-17 22:05:04 +02:00
committed by GitHub
parent 599359ec30
commit 074882b3a0
2 changed files with 21 additions and 3 deletions

View File

@@ -64,5 +64,5 @@ func (P2PNetworkExtended) JSONSchemaOneOf() []interface{} {
type VPN struct {
Create bool `json:"vpn,omitempty" default:"true"`
Use bool `json:"use,omitempty" default:"true"`
Envs []interface{} `json:"env,omitempty"`
Envs interface{} `json:"env,omitempty"`
}

View File

@@ -178,4 +178,22 @@ auto:
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())
})
})
})