| 1 |
package testsuite |
| 2 |
|
| 3 |
import ( |
| 4 |
"context" |
| 5 |
"log/slog" |
| 6 |
|
| 7 |
"github.com/jkroepke/openvpn-auth-oauth2/v2/internal/state" |
| 8 |
) |
| 9 |
|
| 10 |
// FakeOpenVPNClient implements the parts of the OpenVPN client interface used |
| 11 |
// in tests. It does not perform any actions. |
| 12 |
type FakeOpenVPNClient struct{} |
| 13 |
|
| 14 |
// NewFakeOpenVPNClient returns a FakeOpenVPNClient. |
| 15 |
func NewFakeOpenVPNClient() FakeOpenVPNClient { |
| 16 |
return FakeOpenVPNClient{} |
| 17 |
} |
| 18 |
|
| 19 |
// AcceptClient is a no-op implementation of the real method. |
| 20 |
func (FakeOpenVPNClient) AcceptClient(_ context.Context, _ *slog.Logger, _ state.ClientIdentifier, _ string, _ ...string) error { |
| 21 |
return nil |
| 22 |
} |
| 23 |
|
| 24 |
// DenyClient is a no-op implementation of the real method. |
| 25 |
func (FakeOpenVPNClient) DenyClient(_ context.Context, _ *slog.Logger, _ state.ClientIdentifier, _ string) { |
| 26 |
} |