Skip to content

Commit

Permalink
inital commit of end to end tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ianic committed Dec 3, 2021
1 parent 6919c7c commit 7cfd9fe
Show file tree
Hide file tree
Showing 8 changed files with 1,147 additions and 2 deletions.
11 changes: 11 additions & 0 deletions aws/lambda.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@ func (l *Lambda) arn(name string) string {
name)
}

func (l *Lambda) Info(name string) (map[string]string, error) {
gfi := &lambda.GetFunctionInput{
FunctionName: aws.String(name),
}
gfo, err := l.cli.GetFunction(context.Background(), gfi)
if err == nil {
return gfo.Tags, nil
}
return nil, err
}

func (l *Lambda) Invoke(name string, req, rsp interface{}, headers map[string]string) error {
var payload []byte
if req != nil {
Expand Down
4 changes: 2 additions & 2 deletions domain/file_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func ReadActivationToken() (string, error) {
return string(buf), nil
}

func workspacePathAndName() (string, string, error) {
func WorkspacePathAndName() (string, string, error) {
// workspace pats set from env, used in end_to_end test
if val, ok := os.LookupEnv(EnvWorkspacePath); ok {
return val, workspaceFilename, nil
Expand Down Expand Up @@ -193,7 +193,7 @@ func newSingleDeveloper(mustFindProject bool) (*FileStore, error) {
if err != nil && mustFindProject {
return nil, err
}
workspacePath, workspaceFilename, err := workspacePathAndName()
workspacePath, workspaceFilename, err := WorkspacePathAndName()
if err != nil {
return nil, errors.WithStack(err)
}
Expand Down
Loading

0 comments on commit 7cfd9fe

Please sign in to comment.