From da8b66ff8c6d124a8846dd0548ae2ef220fc7235 Mon Sep 17 00:00:00 2001 From: Gabriel Mougard Date: Wed, 26 Feb 2025 11:34:35 +0100 Subject: [PATCH] TO REMOVE Signed-off-by: Gabriel Mougard --- .github/workflows/tests.yml | 36 ++-- test/main.sh | 326 ++++++++++++++++++------------------ 2 files changed, 181 insertions(+), 181 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 455a836c9f28..72106b3cf234 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -53,13 +53,13 @@ jobs: # XXX: `make static-analysis` also run shellcheck but this one provides # useful feedback in the PR through github-code-scanning bot - - id: ShellCheck - name: Differential ShellCheck - uses: redhat-plumbers-in-action/differential-shellcheck@dd551ce780d8af741f8cd8bab6982667b906b457 # v5.5.3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - strict-check-on-push: true - if: github.event_name == 'pull_request' + # - id: ShellCheck + # name: Differential ShellCheck + # uses: redhat-plumbers-in-action/differential-shellcheck@dd551ce780d8af741f8cd8bab6982667b906b457 # v5.5.3 + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + # strict-check-on-push: true + # if: github.event_name == 'pull_request' - name: Upload artifact with ShellCheck defects in SARIF format uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 @@ -161,17 +161,17 @@ jobs: run: mkdir -p "${GOCOVERDIR}" if: env.GOCOVERDIR != '' - - name: Run static analysis - env: - GITHUB_BEFORE: ${{ github.event.before }} - run: | - set -eux - sudo chmod o+w ./lxd/metadata/configuration.json - sudo chmod o+w ./doc/metadata.txt - sudo chmod o+w ./po/* - sudo chmod o+w ./lxd/auth/entitlements_generated.go - sudo chmod o+w ./lxd/auth/drivers/openfga_model.openfga - make static-analysis + # - name: Run static analysis + # env: + # GITHUB_BEFORE: ${{ github.event.before }} + # run: | + # set -eux + # sudo chmod o+w ./lxd/metadata/configuration.json + # sudo chmod o+w ./doc/metadata.txt + # sudo chmod o+w ./po/* + # sudo chmod o+w ./lxd/auth/entitlements_generated.go + # sudo chmod o+w ./lxd/auth/drivers/openfga_model.openfga + # make static-analysis - name: Unit tests (all) run: | diff --git a/test/main.sh b/test/main.sh index a8b770f1daf2..c503886b62b9 100755 --- a/test/main.sh +++ b/test/main.sh @@ -260,173 +260,173 @@ if [ "${1:-"all"}" != "cluster" ]; then fi if [ "${1:-"all"}" != "standalone" ]; then - run_test test_clustering_enable "clustering enable" - run_test test_clustering_membership "clustering membership" - run_test test_clustering_containers "clustering containers" - run_test test_clustering_storage "clustering storage" - run_test test_clustering_storage_single_node "clustering storage single node" - run_test test_clustering_network "clustering network" - run_test test_clustering_publish "clustering publish" - run_test test_clustering_profiles "clustering profiles" - run_test test_clustering_join_api "clustering join api" - run_test test_clustering_shutdown_nodes "clustering shutdown" - run_test test_clustering_projects "clustering projects" - run_test test_clustering_metrics "clustering metrics" - run_test test_clustering_update_cert "clustering update cert" - run_test test_clustering_update_cert_reversion "clustering update cert reversion" - run_test test_clustering_update_cert_token "clustering update cert token" - run_test test_clustering_address "clustering address" - run_test test_clustering_image_replication "clustering image replication" - run_test test_clustering_dns "clustering DNS" - run_test test_clustering_recover "clustering recovery" - run_test test_clustering_handover "clustering handover" - run_test test_clustering_rebalance "clustering rebalance" - run_test test_clustering_remove_raft_node "clustering remove raft node" - run_test test_clustering_failure_domains "clustering failure domains" - run_test test_clustering_image_refresh "clustering image refresh" - run_test test_clustering_evacuation "clustering evacuation" - run_test test_clustering_instance_placement_scriptlet "clustering instance placement scriptlet" - run_test test_clustering_move "clustering move" - run_test test_clustering_edit_configuration "clustering config edit" - run_test test_clustering_remove_members "clustering config remove members" - run_test test_clustering_autotarget "clustering autotarget member" - run_test test_clustering_upgrade "clustering upgrade" - run_test test_clustering_upgrade_large "clustering upgrade_large" - run_test test_clustering_groups "clustering groups" - run_test test_clustering_events "clustering events" - run_test test_clustering_uuid "clustering uuid" - run_test test_clustering_trust_add "clustering trust add" + # run_test test_clustering_enable "clustering enable" + # run_test test_clustering_membership "clustering membership" + # run_test test_clustering_containers "clustering containers" + # run_test test_clustering_storage "clustering storage" + # run_test test_clustering_storage_single_node "clustering storage single node" + # run_test test_clustering_network "clustering network" + # run_test test_clustering_publish "clustering publish" + # run_test test_clustering_profiles "clustering profiles" + # run_test test_clustering_join_api "clustering join api" + # run_test test_clustering_shutdown_nodes "clustering shutdown" + # run_test test_clustering_projects "clustering projects" + # run_test test_clustering_metrics "clustering metrics" + # run_test test_clustering_update_cert "clustering update cert" + # run_test test_clustering_update_cert_reversion "clustering update cert reversion" + # run_test test_clustering_update_cert_token "clustering update cert token" + # run_test test_clustering_address "clustering address" + # run_test test_clustering_image_replication "clustering image replication" + # run_test test_clustering_dns "clustering DNS" + # run_test test_clustering_recover "clustering recovery" + # run_test test_clustering_handover "clustering handover" + # run_test test_clustering_rebalance "clustering rebalance" + # run_test test_clustering_remove_raft_node "clustering remove raft node" + # run_test test_clustering_failure_domains "clustering failure domains" + # run_test test_clustering_image_refresh "clustering image refresh" + # run_test test_clustering_evacuation "clustering evacuation" + # run_test test_clustering_instance_placement_scriptlet "clustering instance placement scriptlet" + # run_test test_clustering_move "clustering move" + # run_test test_clustering_edit_configuration "clustering config edit" + # run_test test_clustering_remove_members "clustering config remove members" + # run_test test_clustering_autotarget "clustering autotarget member" + # run_test test_clustering_upgrade "clustering upgrade" + # run_test test_clustering_upgrade_large "clustering upgrade_large" + # run_test test_clustering_groups "clustering groups" + # run_test test_clustering_events "clustering events" + # run_test test_clustering_uuid "clustering uuid" + # run_test test_clustering_trust_add "clustering trust add" fi if [ "${1:-"all"}" != "cluster" ]; then - run_test test_projects_default "default project" - run_test test_projects_copy "copy/move between projects" - run_test test_projects_crud "projects CRUD operations" - run_test test_projects_containers "containers inside projects" - run_test test_projects_snapshots "snapshots inside projects" - run_test test_projects_backups "backups inside projects" - run_test test_projects_profiles "profiles inside projects" - run_test test_projects_profiles_default "profiles from the global default project" - run_test test_projects_images "images inside projects" - run_test test_projects_images_default "images from the global default project" - run_test test_projects_storage "projects and storage pools" - run_test test_projects_network "projects and networks" - run_test test_projects_limits "projects limits" - run_test test_projects_usage "projects usage" - run_test test_projects_yaml "projects with yaml initialization" - run_test test_projects_before_init "project operations before init" - run_test test_projects_restrictions "projects restrictions" - run_test test_container_devices_disk "container devices - disk" - run_test test_container_devices_disk_restricted "container devices - disk - restricted" - run_test test_container_devices_nic_p2p "container devices - nic - p2p" - run_test test_container_devices_nic_bridged "container devices - nic - bridged" - run_test test_container_devices_nic_bridged_acl "container devices - nic - bridged - acl" - run_test test_container_devices_nic_bridged_filtering "container devices - nic - bridged - filtering" - run_test test_container_devices_nic_bridged_vlan "container devices - nic - bridged - vlan" - run_test test_container_devices_nic_physical "container devices - nic - physical" - run_test test_container_devices_nic_macvlan "container devices - nic - macvlan" - run_test test_container_devices_nic_ipvlan "container devices - nic - ipvlan" - run_test test_container_devices_nic_sriov "container devices - nic - sriov" - run_test test_container_devices_nic_routed "container devices - nic - routed" - run_test test_container_devices_none "container devices - none" - run_test test_container_devices_infiniband_physical "container devices - infiniband - physical" - run_test test_container_devices_infiniband_sriov "container devices - infiniband - sriov" - run_test test_container_devices_proxy "container devices - proxy" - run_test test_container_devices_gpu "container devices - gpu" - run_test test_container_devices_unix "container devices - unix" - run_test test_container_devices_tpm "container devices - tpm" - run_test test_container_move "container server-side move" - run_test test_container_syscall_interception "container syscall interception" - run_test test_security "security features" - run_test test_security_protection "container protection" - run_test test_image_expiry "image expiry" - run_test test_image_list_all_aliases "image list all aliases" - run_test test_image_list_remotes "image list of simplestream remotes" - run_test test_image_auto_update "image auto-update" - run_test test_image_prefer_cached "image prefer cached" - run_test test_image_import_dir "import image from directory" - run_test test_image_import_existing_alias "import existing image from alias" - run_test test_image_refresh "image refresh" - run_test test_image_acl "image acl" - run_test test_cloud_init "cloud-init" - run_test test_exec "exec" - run_test test_exec_exit_code "exec exit code" - run_test test_concurrent_exec "concurrent exec" - run_test test_concurrent "concurrent startup" + # run_test test_projects_default "default project" + # run_test test_projects_copy "copy/move between projects" + # run_test test_projects_crud "projects CRUD operations" + # run_test test_projects_containers "containers inside projects" + # run_test test_projects_snapshots "snapshots inside projects" + # run_test test_projects_backups "backups inside projects" + # run_test test_projects_profiles "profiles inside projects" + # run_test test_projects_profiles_default "profiles from the global default project" + # run_test test_projects_images "images inside projects" + # run_test test_projects_images_default "images from the global default project" + # run_test test_projects_storage "projects and storage pools" + # run_test test_projects_network "projects and networks" + # run_test test_projects_limits "projects limits" + # run_test test_projects_usage "projects usage" + # run_test test_projects_yaml "projects with yaml initialization" + # run_test test_projects_before_init "project operations before init" + # run_test test_projects_restrictions "projects restrictions" + # run_test test_container_devices_disk "container devices - disk" + # run_test test_container_devices_disk_restricted "container devices - disk - restricted" + # run_test test_container_devices_nic_p2p "container devices - nic - p2p" + # run_test test_container_devices_nic_bridged "container devices - nic - bridged" + # run_test test_container_devices_nic_bridged_acl "container devices - nic - bridged - acl" + # run_test test_container_devices_nic_bridged_filtering "container devices - nic - bridged - filtering" + # run_test test_container_devices_nic_bridged_vlan "container devices - nic - bridged - vlan" + # run_test test_container_devices_nic_physical "container devices - nic - physical" + # run_test test_container_devices_nic_macvlan "container devices - nic - macvlan" + # run_test test_container_devices_nic_ipvlan "container devices - nic - ipvlan" + # run_test test_container_devices_nic_sriov "container devices - nic - sriov" + # run_test test_container_devices_nic_routed "container devices - nic - routed" + # run_test test_container_devices_none "container devices - none" + # run_test test_container_devices_infiniband_physical "container devices - infiniband - physical" + # run_test test_container_devices_infiniband_sriov "container devices - infiniband - sriov" + # run_test test_container_devices_proxy "container devices - proxy" + # run_test test_container_devices_gpu "container devices - gpu" + # run_test test_container_devices_unix "container devices - unix" + # run_test test_container_devices_tpm "container devices - tpm" + # run_test test_container_move "container server-side move" + # run_test test_container_syscall_interception "container syscall interception" + # run_test test_security "security features" + # run_test test_security_protection "container protection" + # run_test test_image_expiry "image expiry" + # run_test test_image_list_all_aliases "image list all aliases" + # run_test test_image_list_remotes "image list of simplestream remotes" + # run_test test_image_auto_update "image auto-update" + # run_test test_image_prefer_cached "image prefer cached" + # run_test test_image_import_dir "import image from directory" + # run_test test_image_import_existing_alias "import existing image from alias" + # run_test test_image_refresh "image refresh" + # run_test test_image_acl "image acl" + # run_test test_cloud_init "cloud-init" + # run_test test_exec "exec" + # run_test test_exec_exit_code "exec exit code" + # run_test test_concurrent_exec "concurrent exec" + # run_test test_concurrent "concurrent startup" run_test test_shutdown "lxd shutdown sequence" - run_test test_snapshots "container snapshots" - run_test test_snap_restore "snapshot restores" - run_test test_snap_expiry "snapshot expiry" - run_test test_snap_schedule "snapshot scheduling" - run_test test_snap_volume_db_recovery "snapshot volume database record recovery" - run_test test_snap_fail "snapshot creation failure" - run_test test_config_profiles "profiles and configuration" - run_test test_config_edit "container configuration edit" - run_test test_property "container property" - run_test test_config_edit_container_snapshot_pool_config "container and snapshot volume configuration edit" - run_test test_container_metadata "manage container metadata and templates" - run_test test_container_snapshot_config "container snapshot configuration" - run_test test_server_config "server configuration" - run_test test_filemanip "file manipulations" - run_test test_network "network management" - run_test test_network_acl "network ACL management" - run_test test_network_forward "network address forwards" - run_test test_network_zone "network DNS zones" - run_test test_network_ovn "OVN network management" - run_test test_idmap "id mapping" - run_test test_template "file templating" - run_test test_pki "PKI mode" - run_test test_devlxd "/dev/lxd" - run_test test_fuidshift "fuidshift" - run_test test_migration "migration" - run_test test_lxc_to_lxd "LXC to LXD" - run_test test_fdleak "fd leak" - run_test test_storage "storage" - run_test test_storage_volume_snapshots "storage volume snapshots" - run_test test_init_auto "lxd init auto" - run_test test_init_dump "lxd init dump" - run_test test_init_interactive "lxd init interactive" - run_test test_init_preseed "lxd init preseed" - run_test test_storage_profiles "storage profiles" - run_test test_container_recover "container recover" - run_test test_bucket_recover "bucket recover" - run_test test_get_operations "test_get_operations" - run_test test_storage_volume_attach "attaching storage volumes" - run_test test_storage_driver_btrfs "btrfs storage driver" - run_test test_storage_driver_ceph "ceph storage driver" - run_test test_storage_driver_cephfs "cephfs storage driver" - run_test test_storage_driver_dir "dir storage driver" - run_test test_storage_driver_zfs "zfs storage driver" - run_test test_storage_driver_pure "pure storage driver" - run_test test_storage_buckets "storage buckets" - run_test test_storage_volume_import "storage volume import" - run_test test_storage_volume_initial_config "storage volume initial configuration" - run_test test_resources "resources" - run_test test_kernel_limits "kernel limits" - run_test test_console "console" - run_test test_query "query" - run_test test_storage_local_volume_handling "storage local volume handling" - run_test test_backup_import "backup import" - run_test test_backup_export "backup export" - run_test test_backup_rename "backup rename" - run_test test_backup_volume_export "backup volume export" - run_test test_backup_export_import_instance_only "backup export and import instance only" - run_test test_backup_volume_rename_delete "backup volume rename and delete" - run_test test_backup_different_instance_uuid "backup instance and check instance UUIDs" - run_test test_backup_volume_expiry "backup volume expiry" - run_test test_backup_export_import_recover "backup export, import, and recovery" - run_test test_container_local_cross_pool_handling "container local cross pool handling" - run_test test_incremental_copy "incremental container copy" - run_test test_profiles_project_default "profiles in default project" - run_test test_profiles_project_images_profiles "profiles in project with images and profiles enabled" - run_test test_profiles_project_images "profiles in project with images enabled and profiles disabled" - run_test test_profiles_project_profiles "profiles in project with images disabled and profiles enabled" - run_test test_filtering "API filtering" - run_test test_warnings "Warnings" - run_test test_metrics "Metrics" - run_test test_storage_volume_recover "Recover storage volumes" - run_test test_syslog_socket "Syslog socket" - run_test test_lxd_user "lxd user" + # run_test test_snapshots "container snapshots" + # run_test test_snap_restore "snapshot restores" + # run_test test_snap_expiry "snapshot expiry" + # run_test test_snap_schedule "snapshot scheduling" + # run_test test_snap_volume_db_recovery "snapshot volume database record recovery" + # run_test test_snap_fail "snapshot creation failure" + # run_test test_config_profiles "profiles and configuration" + # run_test test_config_edit "container configuration edit" + # run_test test_property "container property" + # run_test test_config_edit_container_snapshot_pool_config "container and snapshot volume configuration edit" + # run_test test_container_metadata "manage container metadata and templates" + # run_test test_container_snapshot_config "container snapshot configuration" + # run_test test_server_config "server configuration" + # run_test test_filemanip "file manipulations" + # run_test test_network "network management" + # run_test test_network_acl "network ACL management" + # run_test test_network_forward "network address forwards" + # run_test test_network_zone "network DNS zones" + # run_test test_network_ovn "OVN network management" + # run_test test_idmap "id mapping" + # run_test test_template "file templating" + # run_test test_pki "PKI mode" + # run_test test_devlxd "/dev/lxd" + # run_test test_fuidshift "fuidshift" + # run_test test_migration "migration" + # run_test test_lxc_to_lxd "LXC to LXD" + # run_test test_fdleak "fd leak" + # run_test test_storage "storage" + # run_test test_storage_volume_snapshots "storage volume snapshots" + # run_test test_init_auto "lxd init auto" + # run_test test_init_dump "lxd init dump" + # run_test test_init_interactive "lxd init interactive" + # run_test test_init_preseed "lxd init preseed" + # run_test test_storage_profiles "storage profiles" + # run_test test_container_recover "container recover" + # run_test test_bucket_recover "bucket recover" + # run_test test_get_operations "test_get_operations" + # run_test test_storage_volume_attach "attaching storage volumes" + # run_test test_storage_driver_btrfs "btrfs storage driver" + # run_test test_storage_driver_ceph "ceph storage driver" + # run_test test_storage_driver_cephfs "cephfs storage driver" + # run_test test_storage_driver_dir "dir storage driver" + # run_test test_storage_driver_zfs "zfs storage driver" + # run_test test_storage_driver_pure "pure storage driver" + # run_test test_storage_buckets "storage buckets" + # run_test test_storage_volume_import "storage volume import" + # run_test test_storage_volume_initial_config "storage volume initial configuration" + # run_test test_resources "resources" + # run_test test_kernel_limits "kernel limits" + # run_test test_console "console" + # run_test test_query "query" + # run_test test_storage_local_volume_handling "storage local volume handling" + # run_test test_backup_import "backup import" + # run_test test_backup_export "backup export" + # run_test test_backup_rename "backup rename" + # run_test test_backup_volume_export "backup volume export" + # run_test test_backup_export_import_instance_only "backup export and import instance only" + # run_test test_backup_volume_rename_delete "backup volume rename and delete" + # run_test test_backup_different_instance_uuid "backup instance and check instance UUIDs" + # run_test test_backup_volume_expiry "backup volume expiry" + # run_test test_backup_export_import_recover "backup export, import, and recovery" + # run_test test_container_local_cross_pool_handling "container local cross pool handling" + # run_test test_incremental_copy "incremental container copy" + # run_test test_profiles_project_default "profiles in default project" + # run_test test_profiles_project_images_profiles "profiles in project with images and profiles enabled" + # run_test test_profiles_project_images "profiles in project with images enabled and profiles disabled" + # run_test test_profiles_project_profiles "profiles in project with images disabled and profiles enabled" + # run_test test_filtering "API filtering" + # run_test test_warnings "Warnings" + # run_test test_metrics "Metrics" + # run_test test_storage_volume_recover "Recover storage volumes" + # run_test test_syslog_socket "Syslog socket" + # run_test test_lxd_user "lxd user" fi # shellcheck disable=SC2034