Fix tests

This commit is contained in:
Jeff Hubbard 2022-04-12 10:26:08 -07:00
parent de9b5ad8f8
commit 9fb6cf5423
2 changed files with 7 additions and 1 deletions

View file

@ -58,7 +58,7 @@ func (a *App) Create(ctx context.Context, opts createOptions) error {
vscsTargetUrl := os.Getenv("VSCS_TARGET_URL")
DEFAULT_DEVCONTAINER_DEFINITIONS := []string{".devcontainer.json", ".devcontainer/devcontainer.json"}
userInputs := struct {
Repository string
Branch string

View file

@ -36,6 +36,9 @@ func TestApp_Create(t *testing.T) {
DefaultBranch: "main",
}, nil
},
ListDevContainersFunc: func(ctx context.Context, repoID int, branch string, limit int) ([]api.DevContainerEntry, error) {
return []api.DevContainerEntry{{Path: ".devcontainer/devcontainer.json"}}, nil
},
GetCodespacesMachinesFunc: func(ctx context.Context, repoID int, branch, location string) ([]*api.Machine, error) {
return []*api.Machine{
{
@ -265,6 +268,9 @@ func TestApp_Create(t *testing.T) {
DefaultBranch: "main",
}, nil
},
ListDevContainersFunc: func(ctx context.Context, repoID int, branch string, limit int) ([]api.DevContainerEntry, error) {
return []api.DevContainerEntry{{Path: ".devcontainer/devcontainer.json"}}, nil
},
GetCodespacesMachinesFunc: func(ctx context.Context, repoID int, branch, location string) ([]*api.Machine, error) {
return []*api.Machine{
{