Documentation ¶
Index ¶
- func BuildServerHack(t *testing.T)
- func CompareAllCredWrappers(allWrapA *pb.AllCredsWrapper, allWrapB *pb.AllCredsWrapper) bool
- func CompareCredWrappers(credWrapA *pb.CredWrapper, credWrapB *pb.CredWrapper) bool
- func CompareRepoCredWrappers(repoWrapA *pb.RepoCredWrapper, repoWrapB *pb.RepoCredWrapper) bool
- func CreateDoThingsWebServer(tarLoc string, port string)
- func DockerCreate(t *testing.T, ctx context.Context, imageName string, ports []string, ...) (isRunning bool, cleanup func())
- func DockerCreateExec(t *testing.T, ctx context.Context, imageName string, ports []string, ...) (cleanup func(), err error)
- func InitServerAndConsulet(t *testing.T) (*consulet.Consulet, *testutil.TestServer)
- func NewFakeBuildClient(logLines []string) *fakeBuildClient
- func NewFakeGuideOcelotLogsCli(lines []string) *fakeGuideOcelotLogsClient
- func NewTestBuildRuntime(done bool, ip string, grpcPort string, logLines []string) *testBuildRuntime
- func TarTemplates(t *testing.T, tarLoc, relativeTemplateLoc string) func(t *testing.T)
- type FakeGuideOcelotClient
- func (f *FakeGuideOcelotClient) AppleCredExists(ctx context.Context, in *pb.AppleCreds, opts ...grpc.CallOption) (*pb.Exists, error)
- func (f *FakeGuideOcelotClient) BuildRepoAndHash(ctx context.Context, in *pb.BuildReq, opts ...grpc.CallOption) (pb.GuideOcelot_BuildRepoAndHashClient, error)
- func (f *FakeGuideOcelotClient) BuildRuntime(ctx context.Context, in *pb.BuildQuery, opts ...grpc.CallOption) (*pb.Builds, error)
- func (f *FakeGuideOcelotClient) CheckConn(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
- func (f *FakeGuideOcelotClient) DeletePollRepo(ctx context.Context, poll *pb.PollRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (f *FakeGuideOcelotClient) FindWerker(ctx context.Context, in *pb.BuildReq, opts ...grpc.CallOption) (*pb.BuildRuntimeInfo, error)
- func (f *FakeGuideOcelotClient) GenericCredExists(ctx context.Context, in *pb.GenericCreds, opts ...grpc.CallOption) (*pb.Exists, error)
- func (f *FakeGuideOcelotClient) GetAllCreds(ctx context.Context, msg *empty.Empty, opts ...grpc.CallOption) (*pb.AllCredsWrapper, error)
- func (f *FakeGuideOcelotClient) GetAppleCred(ctx context.Context, in *pb.AppleCreds, opts ...grpc.CallOption) (*pb.AppleCreds, error)
- func (f *FakeGuideOcelotClient) GetAppleCreds(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*pb.AppleCredsWrapper, error)
- func (f *FakeGuideOcelotClient) GetGenericCreds(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*pb.GenericWrap, error)
- func (f *FakeGuideOcelotClient) GetK8SCred(ctx context.Context, in *pb.K8SCreds, opts ...grpc.CallOption) (*pb.K8SCreds, error)
- func (f *FakeGuideOcelotClient) GetK8SCreds(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*pb.K8SCredsWrapper, error)
- func (f *FakeGuideOcelotClient) GetNotifyCred(ctx context.Context, in *pb.NotifyCreds, opts ...grpc.CallOption) (*pb.NotifyCreds, error)
- func (f *FakeGuideOcelotClient) GetNotifyCreds(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*pb.NotifyWrap, error)
- func (f *FakeGuideOcelotClient) GetRepoCred(ctx context.Context, in *pb.RepoCreds, opts ...grpc.CallOption) (*pb.RepoCreds, error)
- func (f *FakeGuideOcelotClient) GetRepoCreds(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*pb.RepoCredWrapper, error)
- func (f *FakeGuideOcelotClient) GetSSHCred(ctx context.Context, in *pb.SSHKeyWrapper, opts ...grpc.CallOption) (*pb.SSHKeyWrapper, error)
- func (f *FakeGuideOcelotClient) GetSSHCreds(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*pb.SSHWrap, error)
- func (g *FakeGuideOcelotClient) GetStatus(ctx context.Context, query *pb.StatusQuery, opts ...grpc.CallOption) (*pb.Status, error)
- func (f *FakeGuideOcelotClient) GetTrackedRepos(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*pb.AcctRepos, error)
- func (f *FakeGuideOcelotClient) GetVCSCred(ctx context.Context, in *pb.VCSCreds, opts ...grpc.CallOption) (*pb.VCSCreds, error)
- func (f *FakeGuideOcelotClient) GetVCSCreds(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*pb.CredWrapper, error)
- func (f *FakeGuideOcelotClient) K8SCredExists(ctx context.Context, in *pb.K8SCreds, opts ...grpc.CallOption) (*pb.Exists, error)
- func (f *FakeGuideOcelotClient) LastFewSummaries(ctx context.Context, in *pb.RepoAccount, opts ...grpc.CallOption) (*pb.Summaries, error)
- func (f *FakeGuideOcelotClient) ListPolledRepos(ctx context.Context, empti *empty.Empty, opts ...grpc.CallOption) (*pb.Polls, error)
- func (f *FakeGuideOcelotClient) Logs(ctx context.Context, in *pb.BuildQuery, opts ...grpc.CallOption) (pb.GuideOcelot_LogsClient, error)
- func (f *FakeGuideOcelotClient) NotifyCredExists(ctx context.Context, in *pb.NotifyCreds, opts ...grpc.CallOption) (*pb.Exists, error)
- func (f *FakeGuideOcelotClient) PollRepo(ctx context.Context, poll *pb.PollRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (f *FakeGuideOcelotClient) RepoCredExists(ctx context.Context, in *pb.RepoCreds, opts ...grpc.CallOption) (*pb.Exists, error)
- func (f *FakeGuideOcelotClient) SSHCredExists(ctx context.Context, in *pb.SSHKeyWrapper, opts ...grpc.CallOption) (*pb.Exists, error)
- func (f *FakeGuideOcelotClient) SetAppleCreds(ctx context.Context, in *pb.AppleCreds, opts ...grpc.CallOption) (*empty.Empty, error)
- func (f *FakeGuideOcelotClient) SetGenericCreds(ctx context.Context, in *pb.GenericCreds, opts ...grpc.CallOption) (*empty.Empty, error)
- func (f *FakeGuideOcelotClient) SetK8SCreds(ctx context.Context, in *pb.K8SCreds, opts ...grpc.CallOption) (*empty.Empty, error)
- func (f *FakeGuideOcelotClient) SetNotifyCreds(ctx context.Context, in *pb.NotifyCreds, opts ...grpc.CallOption) (*empty.Empty, error)
- func (f *FakeGuideOcelotClient) SetRepoCreds(ctx context.Context, in *pb.RepoCreds, opts ...grpc.CallOption) (*empty.Empty, error)
- func (f *FakeGuideOcelotClient) SetSSHCreds(ctx context.Context, in *pb.SSHKeyWrapper, opts ...grpc.CallOption) (*empty.Empty, error)
- func (f *FakeGuideOcelotClient) SetVCSCreds(ctx context.Context, in *pb.VCSCreds, opts ...grpc.CallOption) (*empty.Empty, error)
- func (f *FakeGuideOcelotClient) SetVCSPrivateKey(ctx context.Context, in *pb.SSHKeyWrapper, opts ...grpc.CallOption) (*empty.Empty, error)
- func (f *FakeGuideOcelotClient) UpdateAppleCreds(ctx context.Context, in *pb.AppleCreds, opts ...grpc.CallOption) (*empty.Empty, error)
- func (f *FakeGuideOcelotClient) UpdateGenericCreds(ctx context.Context, in *pb.GenericCreds, opts ...grpc.CallOption) (*empty.Empty, error)
- func (f *FakeGuideOcelotClient) UpdateK8SCreds(ctx context.Context, in *pb.K8SCreds, opts ...grpc.CallOption) (*empty.Empty, error)
- func (f *FakeGuideOcelotClient) UpdateNotifyCreds(ctx context.Context, in *pb.NotifyCreds, opts ...grpc.CallOption) (*empty.Empty, error)
- func (f *FakeGuideOcelotClient) UpdateRepoCreds(ctx context.Context, in *pb.RepoCreds, opts ...grpc.CallOption) (*empty.Empty, error)
- func (f *FakeGuideOcelotClient) UpdateSSHCreds(ctx context.Context, in *pb.SSHKeyWrapper, opts ...grpc.CallOption) (*empty.Empty, error)
- func (f *FakeGuideOcelotClient) UpdateVCSCreds(ctx context.Context, in *pb.VCSCreds, opts ...grpc.CallOption) (*empty.Empty, error)
- func (f *FakeGuideOcelotClient) VCSCredExists(ctx context.Context, in *pb.VCSCreds, opts ...grpc.CallOption) (*pb.Exists, error)
- func (f *FakeGuideOcelotClient) WatchRepo(ctx context.Context, in *pb.RepoAccount, opts ...grpc.CallOption) (*empty.Empty, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildServerHack ¶
BuildServerHack will check the environment for a variable $BUILDSERVERHACK, will skip if it does not exist
func CompareAllCredWrappers ¶
func CompareAllCredWrappers(allWrapA *pb.AllCredsWrapper, allWrapB *pb.AllCredsWrapper) bool
func CompareCredWrappers ¶
func CompareCredWrappers(credWrapA *pb.CredWrapper, credWrapB *pb.CredWrapper) bool
func CompareRepoCredWrappers ¶
func CompareRepoCredWrappers(repoWrapA *pb.RepoCredWrapper, repoWrapB *pb.RepoCredWrapper) bool
func CreateDoThingsWebServer ¶
func DockerCreate ¶
func DockerCreate(t *testing.T, ctx context.Context, imageName string, ports []string, mounts ...string) (isRunning bool, cleanup func())
i used all the damn functions that docker is using WHY
func DockerCreateExec ¶
func DockerCreateExec(t *testing.T, ctx context.Context, imageName string, ports []string, mounts ...string) (cleanup func(), err error)
DockerCreateExec creates a docker container by running the docker client via the os/exec package. It will return a cleanup function that will kill the container.
func InitServerAndConsulet ¶
func NewFakeBuildClient ¶
func NewFakeBuildClient(logLines []string) *fakeBuildClient
func NewFakeGuideOcelotLogsCli ¶
func NewFakeGuideOcelotLogsCli(lines []string) *fakeGuideOcelotLogsClient
func NewTestBuildRuntime ¶
Types ¶
type FakeGuideOcelotClient ¶
type FakeGuideOcelotClient struct { pb.GuideOcelotClient Generics *pb.GenericWrap ReturnError bool Exists bool NotConnected bool // contains filtered or unexported fields }
func NewFakeGuideOcelotClient ¶
func NewFakeGuideOcelotClient(logLines []string) *FakeGuideOcelotClient
func (*FakeGuideOcelotClient) AppleCredExists ¶
func (f *FakeGuideOcelotClient) AppleCredExists(ctx context.Context, in *pb.AppleCreds, opts ...grpc.CallOption) (*pb.Exists, error)
func (*FakeGuideOcelotClient) BuildRepoAndHash ¶
func (f *FakeGuideOcelotClient) BuildRepoAndHash(ctx context.Context, in *pb.BuildReq, opts ...grpc.CallOption) (pb.GuideOcelot_BuildRepoAndHashClient, error)
func (*FakeGuideOcelotClient) BuildRuntime ¶
func (f *FakeGuideOcelotClient) BuildRuntime(ctx context.Context, in *pb.BuildQuery, opts ...grpc.CallOption) (*pb.Builds, error)
func (*FakeGuideOcelotClient) CheckConn ¶
func (f *FakeGuideOcelotClient) CheckConn(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
func (*FakeGuideOcelotClient) DeletePollRepo ¶
func (f *FakeGuideOcelotClient) DeletePollRepo(ctx context.Context, poll *pb.PollRequest, opts ...grpc.CallOption) (*empty.Empty, error)
func (*FakeGuideOcelotClient) FindWerker ¶
func (f *FakeGuideOcelotClient) FindWerker(ctx context.Context, in *pb.BuildReq, opts ...grpc.CallOption) (*pb.BuildRuntimeInfo, error)
func (*FakeGuideOcelotClient) GenericCredExists ¶
func (f *FakeGuideOcelotClient) GenericCredExists(ctx context.Context, in *pb.GenericCreds, opts ...grpc.CallOption) (*pb.Exists, error)
func (*FakeGuideOcelotClient) GetAllCreds ¶
func (f *FakeGuideOcelotClient) GetAllCreds(ctx context.Context, msg *empty.Empty, opts ...grpc.CallOption) (*pb.AllCredsWrapper, error)
func (*FakeGuideOcelotClient) GetAppleCred ¶
func (f *FakeGuideOcelotClient) GetAppleCred(ctx context.Context, in *pb.AppleCreds, opts ...grpc.CallOption) (*pb.AppleCreds, error)
func (*FakeGuideOcelotClient) GetAppleCreds ¶
func (f *FakeGuideOcelotClient) GetAppleCreds(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*pb.AppleCredsWrapper, error)
func (*FakeGuideOcelotClient) GetGenericCreds ¶
func (f *FakeGuideOcelotClient) GetGenericCreds(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*pb.GenericWrap, error)
func (*FakeGuideOcelotClient) GetK8SCred ¶
func (f *FakeGuideOcelotClient) GetK8SCred(ctx context.Context, in *pb.K8SCreds, opts ...grpc.CallOption) (*pb.K8SCreds, error)
func (*FakeGuideOcelotClient) GetK8SCreds ¶
func (f *FakeGuideOcelotClient) GetK8SCreds(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*pb.K8SCredsWrapper, error)
func (*FakeGuideOcelotClient) GetNotifyCred ¶
func (f *FakeGuideOcelotClient) GetNotifyCred(ctx context.Context, in *pb.NotifyCreds, opts ...grpc.CallOption) (*pb.NotifyCreds, error)
func (*FakeGuideOcelotClient) GetNotifyCreds ¶
func (f *FakeGuideOcelotClient) GetNotifyCreds(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*pb.NotifyWrap, error)
func (*FakeGuideOcelotClient) GetRepoCred ¶
func (f *FakeGuideOcelotClient) GetRepoCred(ctx context.Context, in *pb.RepoCreds, opts ...grpc.CallOption) (*pb.RepoCreds, error)
func (*FakeGuideOcelotClient) GetRepoCreds ¶
func (f *FakeGuideOcelotClient) GetRepoCreds(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*pb.RepoCredWrapper, error)
func (*FakeGuideOcelotClient) GetSSHCred ¶
func (f *FakeGuideOcelotClient) GetSSHCred(ctx context.Context, in *pb.SSHKeyWrapper, opts ...grpc.CallOption) (*pb.SSHKeyWrapper, error)
func (*FakeGuideOcelotClient) GetSSHCreds ¶
func (f *FakeGuideOcelotClient) GetSSHCreds(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*pb.SSHWrap, error)
func (*FakeGuideOcelotClient) GetStatus ¶
func (g *FakeGuideOcelotClient) GetStatus(ctx context.Context, query *pb.StatusQuery, opts ...grpc.CallOption) (*pb.Status, error)
func (*FakeGuideOcelotClient) GetTrackedRepos ¶
func (f *FakeGuideOcelotClient) GetTrackedRepos(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*pb.AcctRepos, error)
func (*FakeGuideOcelotClient) GetVCSCred ¶
func (f *FakeGuideOcelotClient) GetVCSCred(ctx context.Context, in *pb.VCSCreds, opts ...grpc.CallOption) (*pb.VCSCreds, error)
func (*FakeGuideOcelotClient) GetVCSCreds ¶
func (f *FakeGuideOcelotClient) GetVCSCreds(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*pb.CredWrapper, error)
func (*FakeGuideOcelotClient) K8SCredExists ¶
func (f *FakeGuideOcelotClient) K8SCredExists(ctx context.Context, in *pb.K8SCreds, opts ...grpc.CallOption) (*pb.Exists, error)
func (*FakeGuideOcelotClient) LastFewSummaries ¶
func (f *FakeGuideOcelotClient) LastFewSummaries(ctx context.Context, in *pb.RepoAccount, opts ...grpc.CallOption) (*pb.Summaries, error)
todo: implement for testing
func (*FakeGuideOcelotClient) ListPolledRepos ¶
func (f *FakeGuideOcelotClient) ListPolledRepos(ctx context.Context, empti *empty.Empty, opts ...grpc.CallOption) (*pb.Polls, error)
func (*FakeGuideOcelotClient) Logs ¶
func (f *FakeGuideOcelotClient) Logs(ctx context.Context, in *pb.BuildQuery, opts ...grpc.CallOption) (pb.GuideOcelot_LogsClient, error)
todo: make this useful
func (*FakeGuideOcelotClient) NotifyCredExists ¶
func (f *FakeGuideOcelotClient) NotifyCredExists(ctx context.Context, in *pb.NotifyCreds, opts ...grpc.CallOption) (*pb.Exists, error)
func (*FakeGuideOcelotClient) PollRepo ¶
func (f *FakeGuideOcelotClient) PollRepo(ctx context.Context, poll *pb.PollRequest, opts ...grpc.CallOption) (*empty.Empty, error)
func (*FakeGuideOcelotClient) RepoCredExists ¶
func (f *FakeGuideOcelotClient) RepoCredExists(ctx context.Context, in *pb.RepoCreds, opts ...grpc.CallOption) (*pb.Exists, error)
func (*FakeGuideOcelotClient) SSHCredExists ¶
func (f *FakeGuideOcelotClient) SSHCredExists(ctx context.Context, in *pb.SSHKeyWrapper, opts ...grpc.CallOption) (*pb.Exists, error)
func (*FakeGuideOcelotClient) SetAppleCreds ¶
func (f *FakeGuideOcelotClient) SetAppleCreds(ctx context.Context, in *pb.AppleCreds, opts ...grpc.CallOption) (*empty.Empty, error)
func (*FakeGuideOcelotClient) SetGenericCreds ¶
func (f *FakeGuideOcelotClient) SetGenericCreds(ctx context.Context, in *pb.GenericCreds, opts ...grpc.CallOption) (*empty.Empty, error)
func (*FakeGuideOcelotClient) SetK8SCreds ¶
func (f *FakeGuideOcelotClient) SetK8SCreds(ctx context.Context, in *pb.K8SCreds, opts ...grpc.CallOption) (*empty.Empty, error)
func (*FakeGuideOcelotClient) SetNotifyCreds ¶
func (f *FakeGuideOcelotClient) SetNotifyCreds(ctx context.Context, in *pb.NotifyCreds, opts ...grpc.CallOption) (*empty.Empty, error)
func (*FakeGuideOcelotClient) SetRepoCreds ¶
func (f *FakeGuideOcelotClient) SetRepoCreds(ctx context.Context, in *pb.RepoCreds, opts ...grpc.CallOption) (*empty.Empty, error)
func (*FakeGuideOcelotClient) SetSSHCreds ¶
func (f *FakeGuideOcelotClient) SetSSHCreds(ctx context.Context, in *pb.SSHKeyWrapper, opts ...grpc.CallOption) (*empty.Empty, error)
func (*FakeGuideOcelotClient) SetVCSCreds ¶
func (f *FakeGuideOcelotClient) SetVCSCreds(ctx context.Context, in *pb.VCSCreds, opts ...grpc.CallOption) (*empty.Empty, error)
func (*FakeGuideOcelotClient) SetVCSPrivateKey ¶
func (f *FakeGuideOcelotClient) SetVCSPrivateKey(ctx context.Context, in *pb.SSHKeyWrapper, opts ...grpc.CallOption) (*empty.Empty, error)
func (*FakeGuideOcelotClient) UpdateAppleCreds ¶
func (f *FakeGuideOcelotClient) UpdateAppleCreds(ctx context.Context, in *pb.AppleCreds, opts ...grpc.CallOption) (*empty.Empty, error)
func (*FakeGuideOcelotClient) UpdateGenericCreds ¶
func (f *FakeGuideOcelotClient) UpdateGenericCreds(ctx context.Context, in *pb.GenericCreds, opts ...grpc.CallOption) (*empty.Empty, error)
func (*FakeGuideOcelotClient) UpdateK8SCreds ¶
func (f *FakeGuideOcelotClient) UpdateK8SCreds(ctx context.Context, in *pb.K8SCreds, opts ...grpc.CallOption) (*empty.Empty, error)
func (*FakeGuideOcelotClient) UpdateNotifyCreds ¶
func (f *FakeGuideOcelotClient) UpdateNotifyCreds(ctx context.Context, in *pb.NotifyCreds, opts ...grpc.CallOption) (*empty.Empty, error)
func (*FakeGuideOcelotClient) UpdateRepoCreds ¶
func (f *FakeGuideOcelotClient) UpdateRepoCreds(ctx context.Context, in *pb.RepoCreds, opts ...grpc.CallOption) (*empty.Empty, error)
func (*FakeGuideOcelotClient) UpdateSSHCreds ¶
func (f *FakeGuideOcelotClient) UpdateSSHCreds(ctx context.Context, in *pb.SSHKeyWrapper, opts ...grpc.CallOption) (*empty.Empty, error)
func (*FakeGuideOcelotClient) UpdateVCSCreds ¶
func (f *FakeGuideOcelotClient) UpdateVCSCreds(ctx context.Context, in *pb.VCSCreds, opts ...grpc.CallOption) (*empty.Empty, error)
func (*FakeGuideOcelotClient) VCSCredExists ¶
func (f *FakeGuideOcelotClient) VCSCredExists(ctx context.Context, in *pb.VCSCreds, opts ...grpc.CallOption) (*pb.Exists, error)
func (*FakeGuideOcelotClient) WatchRepo ¶
func (f *FakeGuideOcelotClient) WatchRepo(ctx context.Context, in *pb.RepoAccount, opts ...grpc.CallOption) (*empty.Empty, error)
Click to show internal directories.
Click to hide internal directories.