Skip to content
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

test: re-enable integration tests for node manager #1695

Merged

Conversation

jacderida
Copy link
Contributor

@jacderida jacderida commented May 9, 2024

  • eaa56fa feat: provide local status command

    The status of services and the status of local networks are separated into two different commands in
    anticipation of the node manager integration tests running against a local network.

  • ec46a92 test: enable node man integration tests

    These tests are enabled again, along with some changes to the setup.

    Here are the important points:

    • The tests now run against an isolated local network and binary built during CI is supplied.
    • The workflow runs the e2e tests for both system-wide and user-mode services.
    • The test definitions are moved to a new workflow file, but it has the same conditions as the merge
      workflow. The reason is just because the merge workflow file is already large and difficult to
      navigate.
    • The upgrade integration tests are removed because since the service management refactor, unit
      tests cover the upgrade scenarios well. What we are more concerned with in the upgrade process is
      the logic of how different upgrade scenarios are handled.
    • The daemon integration tests are removed. The test that was setup was really trying to cover the
      scenario where peer retention was specified for restart commands, but we have agreed that the
      semantics of this command is wrong and that it needs to be broken down. In general, the daemon
      commands will correspond to the operations of the node manager, and the node manager operations
      should already be quite well tested.
    • Some documentation.

Copilot Summary

This pull request includes changes to the GitHub Actions workflows, Justfile, README, Vagrantfile, and several Rust source files in the sn_node_manager directory. The changes mainly involve the addition of new workflows and tests, the modification of existing workflows and tests, and the refactoring of code for improved readability and maintainability.

Modifications to GitHub Actions workflows:

Changes to Rust source files:

Addition of new tests:

  • Justfile: Added a new node-man-integration-tests target for running integration tests in a local setup.
  • sn_node_manager/README.md: Added instructions for running integration tests using a virtual machine provided by a Vagrantfile.

Modifications to the development environment:

  • sn_node_manager/Vagrantfile: Made several changes to the configuration of the virtual machine, including changing the synced folder, adding a new provisioner for copying the safe_network code to the root user's home directory, and copying the .vimrc file to the root user's home directory. [1] [2] [3]

OsString::from("--port"),
OsString::from("8080"),
OsString::from("--address"),
OsString::from("127.0.0.1"),

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
eq(ServiceInstallCtx {
args: vec![
OsString::from("--rpc"),
OsString::from("127.0.0.1:20002"),

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
eq(ServiceInstallCtx {
args: vec![
OsString::from("--rpc"),
OsString::from("127.0.0.1:20001"),

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
eq(ServiceInstallCtx {
args: vec![
OsString::from("--rpc"),
OsString::from("127.0.0.1:20000"),

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
eq(ServiceInstallCtx {
args: vec![
OsString::from("--rpc"),
OsString::from("127.0.0.1:15002"),

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
eq(ServiceInstallCtx {
args: vec![
OsString::from("--rpc"),
OsString::from("127.0.0.1:15001"),

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
eq(ServiceInstallCtx {
args: vec![
OsString::from("--rpc"),
OsString::from("127.0.0.1:15000"),

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
eq(ServiceInstallCtx {
args: vec![
OsString::from("--rpc"),
OsString::from("127.0.0.1:15002"),

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
eq(ServiceInstallCtx {
args: vec![
OsString::from("--rpc"),
OsString::from("127.0.0.1:15001"),

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
eq(ServiceInstallCtx {
args: vec![
OsString::from("--rpc"),
OsString::from("127.0.0.1:15000"),

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
@jacderida jacderida force-pushed the node_man-test-re_enable_integration_tests branch 4 times, most recently from 53f3267 to 8c024fa Compare May 9, 2024 20:56
@jacderida jacderida force-pushed the node_man-test-re_enable_integration_tests branch 2 times, most recently from 5798e9f to 3e28ab5 Compare May 21, 2024 20:54
The status of services and the status of local networks are separated into two different commands in
anticipation of the node manager integration tests running against a local network.
@jacderida jacderida force-pushed the node_man-test-re_enable_integration_tests branch 3 times, most recently from 70a33a9 to 307fc05 Compare May 21, 2024 21:56
These tests are enabled again, along with some changes to the setup.

Here are the important points:

* The tests now run against an isolated local network and binary built during CI is supplied.
* The workflow runs the e2e tests for both system-wide and user-mode services.
* The test definitions are moved to a new workflow file, but it has the same conditions as the merge
  workflow. The reason is just because the merge workflow file is already large and difficult to
  navigate.
* The upgrade integration tests are removed because since the service management refactor, unit
  tests cover the upgrade scenarios well. What we are more concerned with in the upgrade process is
  the logic of how different upgrade scenarios are handled.
* The daemon integration tests are removed. The test that was setup was really trying to cover the
  scenario where peer retention was specified for restart commands, but we have agreed that the
  semantics of this command is wrong and that it needs to be broken down. In general, the daemon
  commands will correspond to the operations of the node manager, and the node manager operations
  should already be quite well tested.
* Some documentation.
@jacderida jacderida force-pushed the node_man-test-re_enable_integration_tests branch from 307fc05 to ec46a92 Compare May 21, 2024 22:41
@jacderida jacderida changed the title WIP -- test: re-enable integration tests for node manager test: re-enable integration tests for node manager May 21, 2024
@joshuef joshuef enabled auto-merge May 22, 2024 00:19
@joshuef joshuef added this pull request to the merge queue May 22, 2024
Merged via the queue into maidsafe:main with commit 537f224 May 22, 2024
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants