test: do not skip TLS verify in production

The sandbox will set INSECURE_SKIP_VERIFY=true in the future.
This commit is contained in:
Khue Doan 2024-01-18 19:58:13 +07:00
parent 0ceb426cd5
commit d6d1cd41d5

View File

@ -3,6 +3,7 @@ package test
import (
"crypto/tls"
"fmt"
"os"
"testing"
"time"
@ -40,7 +41,7 @@ func TestSmoke(t *testing.T) {
// Setup a TLS configuration, ignore the certificate because we may not use cert-manager (like the sandbox environment)
tlsConfig := tls.Config{
InsecureSkipVerify: true,
InsecureSkipVerify: os.Getenv("INSECURE_SKIP_VERIFY") != "",
}
// Test the endpoint, this will only fail if we timeout waiting for the service to return a 200 response