Created
March 2, 2023 21:24
-
-
Save niski84/4eb2c4a7a034b5a2036badb765b2c6c1 to your computer and use it in GitHub Desktop.
TestGetEBAppLogs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"testing" | |
"github.com/aws/aws-sdk-go/aws/session" | |
) | |
func TestGetEBAppLogs(t *testing.T) { | |
// Create AWS session | |
sess := session.Must(session.NewSessionWithOptions(session.Options{ | |
SharedConfigState: session.SharedConfigEnable, | |
})) | |
// Define test variables | |
envName := "my-env" | |
outputFile := "logs.txt" | |
// Call function and check for errors | |
err := getEBAppLogs(sess, envName, outputFile) | |
if err != nil { | |
t.Errorf("getEBAppLogs failed with error: %v", err) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment