(t *testing.T)
| 12 | ) |
| 13 | |
| 14 | func Test_Service_runCommand(t *testing.T) { |
| 15 | t.Parallel() |
| 16 | ctrl := gomock.NewController(t) |
| 17 | |
| 18 | ctx := context.Background() |
| 19 | cmder := command.New() |
| 20 | const commandTemplate = `/bin/sh -c "echo {{PORTS}}-{{PORT}}-{{VPN_INTERFACE}}"` |
| 21 | ports := []uint16{1234, 5678} |
| 22 | const vpnInterface = "tun0" |
| 23 | logger := NewMockLogger(ctrl) |
| 24 | logger.EXPECT().Info("1234,5678-1234-tun0") |
| 25 | |
| 26 | err := runCommand(ctx, cmder, logger, commandTemplate, ports, vpnInterface) |
| 27 | |
| 28 | require.NoError(t, err) |
| 29 | } |
nothing calls this directly
no test coverage detected