mirror of
https://github.com/lovelaze/nebula-sync.git
synced 2025-11-05 18:29:19 +01:00
Add missing client test and debug logs
This commit is contained in:
committed by
lovelaze
parent
ca85b6a86d
commit
3edd692b18
@@ -115,6 +115,7 @@ func (client *client) DeleteSession() error {
|
||||
}
|
||||
|
||||
if client.auth.sid == "" {
|
||||
log.Debug().Msg("Trying to delete empty session")
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -106,6 +106,12 @@ func (suite *clientTestSuite) TestClient_PatchConfig() {
|
||||
assert.NoError(suite.T(), err)
|
||||
}
|
||||
|
||||
func (suite *clientTestSuite) TestClient_PostRunGravity() {
|
||||
err := suite.client.PostRunGravity()
|
||||
|
||||
assert.NoError(suite.T(), err)
|
||||
}
|
||||
|
||||
func TestClient_String(t *testing.T) {
|
||||
piHole := model.NewPiHole("http://asdfasdf.com:1234", apiPassword)
|
||||
s := NewClient(piHole, httpClient).String()
|
||||
|
||||
@@ -122,9 +122,7 @@ func createPatchConfigRequest(config *config.ConfigSettings, configResponse *mod
|
||||
patchConfig := model.PatchConfig{}
|
||||
|
||||
if config.DNS {
|
||||
i := configResponse.Config["dns"]
|
||||
m := i.(map[string]interface{})
|
||||
patchConfig.DNS = m
|
||||
patchConfig.DNS = configResponse.Config["dns"].(map[string]interface{})
|
||||
}
|
||||
if config.DHCP {
|
||||
patchConfig.DHCP = configResponse.Config["dhcp"].(map[string]interface{})
|
||||
|
||||
Reference in New Issue
Block a user