mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-10-17 04:50:51 -04:00
Move cli/cmd into cli/internal
This commit is contained in:
parent
d71e97a940
commit
c3ebd3d3cd
34 changed files with 45 additions and 32 deletions
25
cli/internal/cmd/vpnconfig_test.go
Normal file
25
cli/internal/cmd/vpnconfig_test.go
Normal file
|
@ -0,0 +1,25 @@
|
|||
package cmd
|
||||
|
||||
import wgquick "github.com/nmiculinic/wg-quick-go"
|
||||
|
||||
type stubVPNHandler struct {
|
||||
configured bool
|
||||
marshalRes string
|
||||
|
||||
createErr error
|
||||
applyErr error
|
||||
marshalErr error
|
||||
}
|
||||
|
||||
func (c *stubVPNHandler) Create(coordinatorPubKey string, coordinatorPubIP string, clientPrivKey string, clientVPNIP string, mtu int) (*wgquick.Config, error) {
|
||||
return &wgquick.Config{}, c.createErr
|
||||
}
|
||||
|
||||
func (c *stubVPNHandler) Apply(*wgquick.Config) error {
|
||||
c.configured = true
|
||||
return c.applyErr
|
||||
}
|
||||
|
||||
func (c *stubVPNHandler) Marshal(*wgquick.Config) ([]byte, error) {
|
||||
return []byte(c.marshalRes), c.marshalErr
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue