Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
kang-makes committed Oct 3, 2024
1 parent 9e0b6a2 commit 2a9522a
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/mssql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
package tests

import (
"bytes"
"flag"
"fmt"
"os"
"os/exec"
"testing"
"time"

Expand Down Expand Up @@ -54,6 +56,27 @@ func waitForMSSQLIsUpAndRunning(maxTries int) bool {
})
if err != nil {
log.Warn(err.Error())

mssql_command := []string{"docker", "compose", "logs", "mssql"}
mssql_cmd := exec.Command(mssql_command[0], mssql_command[1:]...)
var mssql_out bytes.Buffer
mssql_cmd.Stdout = &mssql_out
mssql_cmd.Stderr = &mssql_out

nri_mssql_command := []string{"docker", "compose", "logs", "nri_mssql"}
nri_mssql_cmd := exec.Command(nri_mssql_command[0], nri_mssql_command[1:]...)
var nri_mssql_out bytes.Buffer
nri_mssql_cmd.Stdout = &nri_mssql_out
nri_mssql_cmd.Stderr = &nri_mssql_out

log.Info("mssql container logs")
_ = mssql_cmd.Run()
log.Info(mssql_out.String())

log.Info("nri_mssql container logs")
_ = nri_mssql_cmd.Run()
log.Info(nri_mssql_out.String())

continue
}
if conn != nil {
Expand All @@ -62,6 +85,7 @@ func waitForMSSQLIsUpAndRunning(maxTries int) bool {
return true
}
}

return false
}

Expand Down

0 comments on commit 2a9522a

Please sign in to comment.