Skip to content

Instantly share code, notes, and snippets.

@niski84
Created March 2, 2023 21:24
Show Gist options
  • Save niski84/4eb2c4a7a034b5a2036badb765b2c6c1 to your computer and use it in GitHub Desktop.
Save niski84/4eb2c4a7a034b5a2036badb765b2c6c1 to your computer and use it in GitHub Desktop.
TestGetEBAppLogs
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