-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - feat: FVM self
subcommand
#3570
[Merged by Bors] - feat: FVM self
subcommand
#3570
Conversation
please add CLI tests in addition to unit test |
@EstebanBorai do we also need an |
As of today we will rely on the install script given for updating FVM, in the future we are likely to implement a dedicated approach. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still missing CLI / Unit tests.
I would expect following tests:
$ ../fvm self-install
$ .../fvm uninstall
And test to ensure directory is created correctly (install) with stable channel. and test to ensure everything is removed correctly
#[derive(Debug, Serialize, Deserialize)] | ||
pub struct Settings { | ||
/// The active `channel` for the Fluvio Installation | ||
pub channel: Option<Channel>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be fixed. it is probably most critical part of this PR
|
||
#[test] | ||
fn update_settings_file() { | ||
create_fvm_dir(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this is calling this? shouldn't installation step should take care of it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is testing tho Settings file creation only, these are unit tests on the Settings struct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't installation step should take care of it?
Yeah! The command takes care of this but theSettings
struct is not responsible of creating the directory.
In this context we just create the settings.toml
file, se I have to prepare the environment for unit tests in this context
I think the tests you are mentioning are here: https://github.com/infinyon/fluvio/blob/8053a155b08ffc92b5e08ee8cae26dd9863c02ac/tests/cli/fvm_smoke_tests/fvm_basic.bats perhaps? |
These tests doesnt do anything since they dont have any validation |
Oh! Sorry about that! I just updated tests, now I also check the presence of the Im testing the following assertions:
|
@sehz just checked for existence using |
bors r+ |
Introduces a subcommand for installing/uninstalling and in the short term also updating FVM. This command is in charge of preparing the environment for FVM before installing and switching Fluvio Versions. --- ## Demo ![CleanShot 2023-09-30 at 19 21 45](https://github.com/infinyon/fluvio/assets/34756077/57fc1a71-a122-4658-b4b8-6e11443a8ceb)
There is an issue with the setting config. Please address them on next PR |
Pull request successfully merged into master. Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
self
subcommandself
subcommand
Introduces a subcommand for installing/uninstalling and in the short term also updating
FVM. This command is in charge of preparing the environment for FVM before installing
and switching Fluvio Versions.
Demo