Skip to content

Commit

Permalink
VPN env vars is an object (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
mauromorales authored Apr 17, 2024
1 parent 599359e commit 074882b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
6 changes: 3 additions & 3 deletions schema/p2p_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (P2PNetworkExtended) JSONSchemaOneOf() []interface{} {

// VPN represents the vpn block in the Kairos configuration.
type VPN struct {
Create bool `json:"vpn,omitempty" default:"true"`
Use bool `json:"use,omitempty" default:"true"`
Envs []interface{} `json:"env,omitempty"`
Create bool `json:"vpn,omitempty" default:"true"`
Use bool `json:"use,omitempty" default:"true"`
Envs interface{} `json:"env,omitempty"`
}
18 changes: 18 additions & 0 deletions schema/p2p_schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
})
})
})

0 comments on commit 074882b

Please sign in to comment.