refactor: improve media service client methods and clean up test files
- Introduced helper methods `getMediaEndpoint` and `getMediaSoapClient` in the media client for better code reuse and clarity. - Updated various media service methods to utilize the new helper methods, enhancing maintainability. - Cleaned up test files by standardizing formatting and removing unnecessary blank lines for improved readability.
This commit is contained in:
@@ -271,9 +271,9 @@ func TestGetImagingState(t *testing.T) {
|
||||
videoSourceToken := config.Profiles[0].VideoSource.Token
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
token string
|
||||
expectOk bool
|
||||
name string
|
||||
token string
|
||||
expectOk bool
|
||||
checkFunc func(*ImagingState) error
|
||||
}{
|
||||
{
|
||||
@@ -436,11 +436,11 @@ func TestServerInfoMethod(t *testing.T) {
|
||||
server, _ := New(config)
|
||||
|
||||
info := server.ServerInfo()
|
||||
|
||||
|
||||
if info == "" {
|
||||
t.Fatal("ServerInfo() returned empty string")
|
||||
}
|
||||
|
||||
|
||||
// ServerInfo returns a formatted string with server information
|
||||
if !strings.Contains(info, "127.0.0.1") && !strings.Contains(info, "localhost") {
|
||||
t.Logf("ServerInfo may not contain host: %s", info)
|
||||
|
||||
Reference in New Issue
Block a user