forked from step-security/secure-repo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain_test.go
33 lines (24 loc) · 783 Bytes
/
main_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package main
import (
"testing"
)
func TestInvokeHTTPRequest(t *testing.T) {
/*sess := session.Must(session.NewSessionWithOptions(session.Options{
SharedConfigState: session.SharedConfigEnable,
}))
// Create DynamoDB client
dynamoDbSvc := dynamodb.New(sess)
importActions(dynamoDbSvc)*/
/*request := &events.APIGatewayV2HTTPRequest{}
request.RawPath = "v1/secure-workflow"
input, _ := ioutil.ReadFile(path.Join("./testfiles/input", "action-issues.yml"))
request.Body = string(input)
bytes, _ := json.Marshal(request)
handler := &Handler{}
response, err := handler.Invoke(context.TODO(), bytes)
if err != nil {
t.Errorf("error not expected %v", err)
}
proxyResponse := &events.APIGatewayProxyResponse{}
err = json.Unmarshal(response, &proxyResponse)*/
}