Skip to content

Commit

Permalink
Added new test for SSL and port 443 (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
esanchezm authored May 1, 2024
1 parent fc4f74e commit bb0e419
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/exporter_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,3 +348,19 @@ def test_server_string_with_different_settings(self):
self.assertEqual(
collector.connection_string, "https://qbittorrent3.example.com:443/server/"
)

config = {
"host": "qbittorrent4.example.com",
"port": "443",
"ssl": True,
"url_base": "server/",
"username": "user",
"password": "pass",
"verify_webui_certificate": True,
"metrics_prefix": "qbittorrent",
}
collector = QbittorrentMetricsCollector(config)
self.assertEqual(collector.server, "qbittorrent4.example.com:443/server/")
self.assertEqual(
collector.connection_string, "https://qbittorrent4.example.com:443/server/"
)

0 comments on commit bb0e419

Please sign in to comment.