Skip to content
This repository was archived by the owner on May 4, 2023. It is now read-only.
This repository was archived by the owner on May 4, 2023. It is now read-only.

Add packet_test #45

@Bolodya1997

Description

@Bolodya1997

Issue

Currently packet provider is not covered with test because there are no stubs for the packet API.

Solution

Create packet_test package with stubs. Ex:

type Option func(*packngo.Client)

func NewClient(options ...Option) *packngo.Client {
    client := new(packngo.Client)

    for _, option := range options {
        option(client)
    }

    return client
}

func WithDevices(conf *Config) Option {
    deviceService := newDeviceService(conf)
    return func(client *packngo.Client) {
        client.Devices = deviceService
    }
}

...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions