Skip to content

Commit

Permalink
fix assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
holmanb committed Mar 15, 2024
1 parent ae35228 commit 68048fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cloudinit/url_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def read_ftps(url: str, timeout: float = 5.0, **kwargs: dict) -> "FtpResponse":
LOG.debug("Reading file: %s", url_parts.path)
ftp_tls.retrbinary(f"RETR {url_parts.path}", callback=buffer.write)

response = FtpResponse(buffer.getvalue())
response = FtpResponse(buffer.getvalue(), url)
LOG.debug("Closing connection")
ftp_tls.close()
return response
Expand Down Expand Up @@ -177,7 +177,7 @@ def read_ftps(url: str, timeout: float = 5.0, **kwargs: dict) -> "FtpResponse":
)
LOG.debug("Reading file: %s", url_parts.path)
ftp.retrbinary(f"RETR {url_parts.path}", callback=buffer.write)
response = FtpResponse(contents=buffer.getvalue())
response = FtpResponse(buffer.getvalue(), url)
LOG.debug("Closing connection")
ftp.close()
return response
Expand Down
4 changes: 2 additions & 2 deletions tests/integration_tests/datasources/test_nocloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def test_nocloud_ftp_unencrypted_server_succeeds(
cmdline = "ds=nocloud;seedfrom=ftp://0.0.0.0:2121"
self._boot_with_cmdline(cmdline, client)
verify_clean_boot(client, ignore_warnings=self.expected_warnings)
assert "ftp-instance" == client.execute("hostname").rstrip()
assert "ftp-bootstrapper" == client.execute("hostname").rstrip()

def test_nocloud_ftps_unencrypted_server_fails(
self, client: IntegrationInstance
Expand Down Expand Up @@ -420,7 +420,7 @@ def test_nocloud_ftps_encrypted_server_succeeds(
cmdline = "ds=nocloud;seedfrom=ftps://localhost:2121"
self._boot_with_cmdline(cmdline, client, encrypted=True)
verify_clean_boot(client, ignore_warnings=self.expected_warnings)
assert "ftp-instance" == client.execute("hostname").rstrip()
assert "ftp-bootstrapper" == client.execute("hostname").rstrip()

def test_nocloud_ftp_encrypted_server_fails(
self, client: IntegrationInstance
Expand Down

0 comments on commit 68048fe

Please sign in to comment.