Add LDAP STS tests and workflow for CI (#13576)

Runs LDAP tests with openldap container on GH Actions
This commit is contained in:
Aditya Manthramurthy
2021-11-04 08:16:30 -07:00
committed by GitHub
parent 64a1904136
commit 01b9ff54d9
7 changed files with 306 additions and 20 deletions

View File

@@ -19,6 +19,7 @@ package cmd
import (
"bytes"
"context"
"encoding/xml"
"fmt"
"io"
@@ -158,6 +159,27 @@ func (s *TestSuiteCommon) SetUpSuite(c *check) {
s.secretKey = s.testServer.SecretKey
}
func (s *TestSuiteCommon) RestartTestServer(c *check) {
// Shutdown.
s.testServer.cancel()
s.testServer.Server.Close()
s.testServer.Obj.Shutdown(context.Background())
// Restart.
ctx, cancel := context.WithCancel(context.Background())
s.testServer.cancel = cancel
s.testServer = initTestServerWithBackend(ctx, c, s.testServer, s.testServer.Obj, s.testServer.rawDiskPaths)
if s.secure {
s.testServer.Server.StartTLS()
} else {
s.testServer.Server.Start()
}
s.client = s.testServer.Server.Client()
s.endPoint = s.testServer.Server.URL
}
func (s *TestSuiteCommon) TearDownSuite(c *check) {
s.testServer.Stop()
}