github.com/axw/juju@v0.0.0-20161005053422-4bd6544d08d4/tools/lxdclient/export_test.go (about) 1 // Copyright 2015 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 // +build go1.3 5 6 package lxdclient 7 8 import ( 9 "github.com/juju/testing" 10 ) 11 12 var NewInstanceSummary = newInstanceSummary 13 14 type RawInstanceClient rawInstanceClient 15 16 func NewInstanceClient(raw RawInstanceClient) *instanceClient { 17 return &instanceClient{ 18 raw: rawInstanceClient(raw), 19 remote: "", 20 } 21 } 22 23 func PatchGenerateCertificate(s *testing.CleanupSuite, cert, key string) { 24 s.PatchValue(&generateCertificate, func() ([]byte, []byte, error) { 25 return []byte(cert), []byte(key), nil 26 }) 27 }