Closed Ruadhri17 closed 1 month ago
:white_check_mark: Passed | :x: Failed | :next_track_button: Skipped | Total | Pass % | :stopwatch: Duration |
---|---|---|---|---|---|
433 | 0 | 3 | 433 | 100 | 0s |
Attention: Patch coverage is 0%
with 50 lines
in your changes are missing coverage. Please review.
Project coverage is 77.3%. Comparing base (
33e6890
) to head (d0a5ff1
). Report is 8 commits behind head on main.
This correctly implements what is described by #2831.
However, looking at the code and the command help, I find the
connect
command more complicated than required. One cause of this complexity is that the bridge file is removed when the connection check fails.What about:
- stop removing the bridge configuration on failed connection check
- perform no connection check on connect unless explicitly requested with
--test
.So:
tedge connect c8y
would behave astedge connect c8y --offline
as implemented heretedge connect c8y --test
would behave astedge connect c8y
as currently implemented when there is no c8y bridge configuration and astedge connect c8y --test
when there is a c8y bridge configuration.
I like the suggestions, though changing the behaviour of tedge connect c8y
would be a breaking change, as some people might already rely on the "connect test" on the configuration before proceeding.
Proposed changes
This PR adds a
--offline
flag totedge connect c8y
that skips connection checks and device registration, which allows the creation of bridge configuration and enables all services while offline.TODO:
Types of changes
Paste Link to the issue
2831
Checklist
cargo fmt
as mentioned in CODING_GUIDELINEScargo clippy
as mentioned in CODING_GUIDELINESFurther comments