Skip to content

Commit

Permalink
Generated mock for the bootstrap service
Browse files Browse the repository at this point in the history
Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
  • Loading branch information
nyagamunene committed Mar 28, 2024
1 parent 2b56793 commit 0379962
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 247 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ DOCKER_PROJECT ?= $(shell echo $(subst $(space),,$(USER_REPO)) | tr -c -s '[:aln
DOCKER_COMPOSE_COMMANDS_SUPPORTED := up down config
DEFAULT_DOCKER_COMPOSE_COMMAND := up
GRPC_MTLS_CERT_FILES_EXISTS = 0
MOCKERY_VERSION=v2.38.0
MOCKERY_VERSION=v2.42.1
ifneq ($(MG_MESSAGE_BROKER_TYPE),)
MG_MESSAGE_BROKER_TYPE := $(MG_MESSAGE_BROKER_TYPE)
else
Expand Down
2 changes: 2 additions & 0 deletions bootstrap/configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ type ConfigsPage struct {
}

// ConfigRepository specifies a Config persistence API.
//
//go:generate mockery --name ConfigRepository --output=./mocks --filename configRepository.go --quiet --note "Copyright (c) Abstract Machines"
type ConfigRepository interface {
// Save persists the Config. Successful operation is indicated by non-nil
// error response.
Expand Down
2 changes: 2 additions & 0 deletions bootstrap/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ var _ Service = (*bootstrapService)(nil)

// Service specifies an API that must be fulfilled by the domain service
// implementation, and all of its decorators (e.g. logging & metrics).
//
//go:generate mockery --name Service --output=./mocks --filename Service.go --quiet --note "Copyright (c) Abstract Machines"
type Service interface {
// Add adds new Thing Config to the user identified by the provided token.
Add(ctx context.Context, token string, cfg Config) (Config, error)
Expand Down
2 changes: 0 additions & 2 deletions coap/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ const chansPrefix = "channels"
var ErrUnsubscribe = errors.New("unable to unsubscribe")

// Service specifies CoAP service API.
//
//go:generate mockery --name Service --output=./mocks --filename service.go --quiet --note "Copyright (c) Abstract Machines"
type Service interface {
// Publish publishes message to specified channel.
// Key is used to authorize publisher.
Expand Down
2 changes: 0 additions & 2 deletions coap/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import (
)

// Client wraps CoAP client.
//
//go:generate mockery --name Client --output=./mocks --filename client.go --quiet --note "Copyright (c) Abstract Machines"
type Client interface {
// In CoAP terminology, Token similar to the Session ID.
Token() string
Expand Down
103 changes: 0 additions & 103 deletions coap/mocks/client.go

This file was deleted.

88 changes: 0 additions & 88 deletions coap/mocks/service.go

This file was deleted.

2 changes: 0 additions & 2 deletions ws/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ var (
)

// Service specifies web socket service API.
//
//go:generate mockery --name Service --output=./mocks --filename service.go --quiet --note "Copyright (c) Abstract Machines"
type Service interface {
// Subscribe subscribes message from the broker using the thingKey for authorization,
// and the channelID for subscription. Subtopic is optional.
Expand Down
49 changes: 0 additions & 49 deletions ws/mocks/service.go

This file was deleted.

0 comments on commit 0379962

Please sign in to comment.