opiproject / sztp

Secure Zero Touch Provisioning (sZTP) in OPI
Apache License 2.0
20 stars 14 forks source link

refactor: move checksum calculation to utils #443

Closed h0lyalg0rithm closed 1 month ago

h0lyalg0rithm commented 1 month ago

Proposed changes

Move sha256 calculation to utils.go file. Add tests to validate change

Types of changes

What types of changes does your code introduce to the repo? Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

glimchb commented 1 month ago

@h0lyalg0rithm in a separate PR , not here, wdyt to move downloadAndValidateImage(), copyConfigurationFile(), launchScriptsConfiguration() to a new file... ? it looks not belonging to daemon.go

h0lyalg0rithm commented 1 month ago

@h0lyalg0rithm in a separate PR , not here, wdyt to move downloadAndValidateImage(), copyConfigurationFile(), launchScriptsConfiguration() to a new file... ? it looks not belonging to daemon.go

I think we should update the golinter version as it displays the line with the issue in the github action run.Here is the output https://github.com/h0lyalg0rithm/sztp/actions/runs/10222129019/job/28286107496

h0lyalg0rithm commented 1 month ago

@h0lyalg0rithm in a separate PR , not here, wdyt to move downloadAndValidateImage(), copyConfigurationFile(), launchScriptsConfiguration() to a new file... ? it looks not belonging to daemon.go

Yes it makes sense to move them

glimchb commented 1 month ago

I think we should update the golinter version

sure, go for it