Documentation
¶
Overview ¶
Package condortest provides a reusable in-process HTCondor test harness.
It stands up a real, ephemeral HTCondor pool (master, collector, shared port, and schedd) via condor_master so that integration tests in any package can exercise CEDAR against a live pool. Tests that use this package are skipped automatically when condor_master is not available in PATH.
Although this is a regular (non _test.go) source file, it intentionally imports the testing package: this is the idiomatic way to share a test harness across multiple Go packages.
Index ¶
- type Harness
- func (h *Harness) CACertFile() string
- func (h *Harness) ConfigDir() string
- func (h *Harness) GetCollectorAddr() string
- func (h *Harness) GetCollectorAlias() string
- func (h *Harness) GetCollectorHost() string
- func (h *Harness) GetCollectorPort() int
- func (h *Harness) HostCertFile() string
- func (h *Harness) HostKeyFile() string
- func (h *Harness) PasswordDir() string
- func (h *Harness) PrintAllLogs()
- func (h *Harness) QuerySchedAds(t *testing.T) (int, string, error)
- func (h *Harness) Shutdown(t *testing.T)
- func (h *Harness) SocketDir() string
- func (h *Harness) SupportsAuthMethod(method string) bool
- func (h *Harness) TmpDir() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Harness ¶
type Harness struct {
// contains filtered or unexported fields
}
Harness manages a mini HTCondor instance for integration testing.
func NewWithConfig ¶
NewWithConfig allows injecting extra HTCondor config lines (e.g., extra daemons).
func (*Harness) CACertFile ¶
CACertFile returns the path to the generated CA certificate.
func (*Harness) GetCollectorAddr ¶
GetCollectorAddr returns the collector address.
func (*Harness) GetCollectorAlias ¶
GetCollectorAlias extracts the alias from the collector sinful string. Sinful string format: <127.0.0.1:52504?addrs=127.0.0.1-52504&alias=f4hp7ql65f-2.local>
func (*Harness) GetCollectorHost ¶
GetCollectorHost returns the collector host.
func (*Harness) GetCollectorPort ¶
GetCollectorPort returns the collector port.
func (*Harness) HostCertFile ¶
HostCertFile returns the path to the generated host certificate.
func (*Harness) HostKeyFile ¶
HostKeyFile returns the path to the generated host private key.
func (*Harness) PasswordDir ¶
PasswordDir returns the directory containing the pool signing key(s).
func (*Harness) PrintAllLogs ¶
func (h *Harness) PrintAllLogs()
PrintAllLogs prints all HTCondor logs for debugging.
func (*Harness) QuerySchedAds ¶
QuerySchedAds queries the collector for schedd ads and returns the count and any found address.
func (*Harness) SocketDir ¶
SocketDir returns the pool's DAEMON_SOCKET_DIR, the directory the condor_shared_port daemon watches for endpoint sockets.
func (*Harness) SupportsAuthMethod ¶
SupportsAuthMethod checks if HTCondor supports a specific authentication method by querying the collector's capabilities.