github.com/drone/runner-go@v1.12.0/registry/registry_test.go (about)

     1  // Copyright 2019 Drone.IO Inc. All rights reserved.
     2  // Use of this source code is governed by the Polyform License
     3  // that can be found in the LICENSE file.
     4  
     5  package registry
     6  
     7  import (
     8  	"context"
     9  
    10  	"github.com/drone/drone-go/drone"
    11  )
    12  
    13  var noContext = context.Background()
    14  
    15  type mockProvider struct {
    16  	out []*drone.Registry
    17  	err error
    18  }
    19  
    20  func (p *mockProvider) List(context.Context, *Request) ([]*drone.Registry, error) {
    21  	return p.out, p.err
    22  }