Fix tests
This commit is contained in:
parent
de9b5ad8f8
commit
9fb6cf5423
2 changed files with 7 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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{
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue