open-amt-cloud-toolkit / rpc-go

The Remote Provisioning Client (RPC) communicates with the Manageability Engine Interface (MEI) and Remote Provisioning Service (RPS) interfaces.
https://open-amt-cloud-toolkit.github.io/docs/
Apache License 2.0
10 stars 14 forks source link

fix(cli): Resolve FQDN on Linux machines with short hostnames #600

Closed webD97 closed 1 month ago

webD97 commented 1 month ago

This patches GetOSDNSSuffix() for Linux so that it correctly resolves the machine's FQDN even if it uses only a short hostname. The implementation is inspired by the implementation of hostname -f.

If the host is already configured with an FQDN, it is returned without further lookups.

Resolves #189

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 0% with 16 lines in your changes missing coverage. Please review.

Project coverage is 70.98%. Comparing base (650935d) to head (13c031e). Report is 290 commits behind head on main.

Files Patch % Lines
internal/amt/linux.go 0.00% 16 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #600 +/- ## =========================================== - Coverage 83.21% 70.98% -12.24% =========================================== Files 32 41 +9 Lines 4265 4149 -116 =========================================== - Hits 3549 2945 -604 - Misses 576 936 +360 - Partials 140 268 +128 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.