Skip to content

Commit

Permalink
[#1461] Enabled ClamAV.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed Jan 28, 2025
1 parent 8d9ed17 commit 7de8744
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 40 deletions.
9 changes: 3 additions & 6 deletions .vortex/tests/bats/circleci.bats
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ load _helper.circleci.bash

assert_contains "homepage.feature" "${artifact_path_runner_0}"
assert_contains "login.feature" "${artifact_path_runner_0}"
# @see https://github.com/drevops/vortex/issues/1461
# assert_contains "clamav.feature" "${artifact_path_runner_0}"
assert_contains "clamav.feature" "${artifact_path_runner_0}"
assert_not_contains "search.feature" "${artifact_path_runner_0}"

artifact_path_runner_1="$(echo "${artifacts_data}" | jq -r '.items | map(select(.node_index == 1).path) | join("\n")')"
Expand All @@ -38,8 +37,7 @@ load _helper.circleci.bash

assert_contains "homepage.feature" "${artifact_path_runner_1}"
assert_contains "login.feature" "${artifact_path_runner_1}"
# @see https://github.com/drevops/vortex/issues/1461
# assert_not_contains "clamav.feature" "${artifact_path_runner_1}"
assert_not_contains "clamav.feature" "${artifact_path_runner_1}"
assert_contains "search.feature" "${artifact_path_runner_1}"
done
}
Expand Down Expand Up @@ -68,8 +66,7 @@ load _helper.circleci.bash

assert_contains "homepage.feature" "${tests_data}"
assert_contains "login.feature" "${tests_data}"
# @see https://github.com/drevops/vortex/issues/1461
# assert_contains "clamav.feature" "${tests_data}"
assert_contains "clamav.feature" "${tests_data}"
assert_contains "search.feature" "${tests_data}"
done
}
35 changes: 14 additions & 21 deletions .vortex/tests/bats/provision.bats
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,8 @@ assert_provision_info() {
"@drush -y php:eval \Drupal::service('config.factory')->getEditable('system.site')->set('name', 'YOURSITE')->save();"
"@drush -y pm:install admin_toolbar coffee config_split config_update media environment_indicator pathauto redirect shield stage_file_proxy"
"@drush -y pm:install redis"
# @see https://github.com/drevops/vortex/issues/1461
# "@drush -y pm:install clamav"
# "@drush -y config-set clamav.settings mode_daemon_tcpip.hostname clamav"
"@drush -y pm:install clamav"
"@drush -y config-set clamav.settings mode_daemon_tcpip.hostname clamav"
"@drush -y pm:install search_api search_api_solr"
"@drush -y pm:install ys_core ys_search"
"@drush -y deploy:hook"
Expand Down Expand Up @@ -254,9 +253,8 @@ assert_provision_info() {
"@drush -y php:eval \Drupal::service('config.factory')->getEditable('system.site')->set('name', 'YOURSITE')->save();"
"@drush -y pm:install admin_toolbar coffee config_split config_update media environment_indicator pathauto redirect shield stage_file_proxy"
"@drush -y pm:install redis"
# @see https://github.com/drevops/vortex/issues/1461
# "@drush -y pm:install clamav"
# "@drush -y config-set clamav.settings mode_daemon_tcpip.hostname clamav"
"@drush -y pm:install clamav"
"@drush -y config-set clamav.settings mode_daemon_tcpip.hostname clamav"
"@drush -y pm:install search_api search_api_solr"
"@drush -y pm:install ys_core ys_search"
"@drush -y deploy:hook"
Expand Down Expand Up @@ -384,9 +382,8 @@ assert_provision_info() {
"@drush -y php:eval \Drupal::service('config.factory')->getEditable('system.site')->set('name', 'YOURSITE')->save();"
"@drush -y pm:install admin_toolbar coffee config_split config_update media environment_indicator pathauto redirect shield stage_file_proxy"
"@drush -y pm:install redis"
# @see https://github.com/drevops/vortex/issues/1461
# "@drush -y pm:install clamav"
# "@drush -y config-set clamav.settings mode_daemon_tcpip.hostname clamav"
"@drush -y pm:install clamav"
"@drush -y config-set clamav.settings mode_daemon_tcpip.hostname clamav"
"@drush -y pm:install search_api search_api_solr"
"@drush -y pm:install ys_core ys_search"
"@drush -y deploy:hook"
Expand Down Expand Up @@ -518,9 +515,8 @@ assert_provision_info() {
"@drush -y php:eval \Drupal::service('config.factory')->getEditable('system.site')->set('name', 'YOURSITE')->save();"
"@drush -y pm:install admin_toolbar coffee config_split config_update media environment_indicator pathauto redirect shield stage_file_proxy"
"@drush -y pm:install redis"
# @see https://github.com/drevops/vortex/issues/1461
# "@drush -y pm:install clamav"
# "@drush -y config-set clamav.settings mode_daemon_tcpip.hostname clamav"
"@drush -y pm:install clamav"
"@drush -y config-set clamav.settings mode_daemon_tcpip.hostname clamav"
"@drush -y pm:install search_api search_api_solr"
"@drush -y pm:install ys_core ys_search"
"@drush -y deploy:hook"
Expand Down Expand Up @@ -648,9 +644,8 @@ assert_provision_info() {
"@drush -y php:eval \Drupal::service('config.factory')->getEditable('system.site')->set('name', 'YOURSITE')->save();"
"@drush -y pm:install admin_toolbar coffee config_split config_update media environment_indicator pathauto redirect shield stage_file_proxy"
"@drush -y pm:install redis"
# @see https://github.com/drevops/vortex/issues/1461
# "@drush -y pm:install clamav"
# "@drush -y config-set clamav.settings mode_daemon_tcpip.hostname clamav"
"@drush -y pm:install clamav"
"@drush -y config-set clamav.settings mode_daemon_tcpip.hostname clamav"
"@drush -y pm:install search_api search_api_solr"
"@drush -y pm:install ys_core ys_search"
"@drush -y deploy:hook"
Expand Down Expand Up @@ -772,9 +767,8 @@ assert_provision_info() {
"@drush -y php:eval \Drupal::service('config.factory')->getEditable('system.site')->set('name', 'YOURSITE')->save();"
"@drush -y pm:install admin_toolbar coffee config_split config_update media environment_indicator pathauto redirect shield stage_file_proxy"
"@drush -y pm:install redis"
# @see https://github.com/drevops/vortex/issues/1461
# "@drush -y pm:install clamav"
# "@drush -y config-set clamav.settings mode_daemon_tcpip.hostname clamav"
"@drush -y pm:install clamav"
"@drush -y config-set clamav.settings mode_daemon_tcpip.hostname clamav"
"@drush -y pm:install search_api search_api_solr"
"@drush -y pm:install ys_core ys_search"
"@drush -y deploy:hook"
Expand Down Expand Up @@ -903,9 +897,8 @@ assert_provision_info() {
"@drush -y php:eval \Drupal::service('config.factory')->getEditable('system.site')->set('name', 'YOURSITE')->save();"
"@drush -y pm:install admin_toolbar coffee config_split config_update media environment_indicator pathauto redirect shield stage_file_proxy"
"@drush -y pm:install redis"
# @see https://github.com/drevops/vortex/issues/1461
# "@drush -y pm:install clamav"
# "@drush -y config-set clamav.settings mode_daemon_tcpip.hostname clamav"
"@drush -y pm:install clamav"
"@drush -y config-set clamav.settings mode_daemon_tcpip.hostname clamav"
"@drush -y pm:install search_api search_api_solr"
"@drush -y pm:install ys_core ys_search"
"@drush -y deploy:hook"
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"composer/installers": "^2.3",
"cweagans/composer-patches": "^1.7",
"drupal/admin_toolbar": "^3.5",
"drupal/clamav": "^2.1",
"drupal/coffee": "^2",
"drupal/config_split": "^2",
"drupal/config_update": "^2@alpha",
Expand Down
5 changes: 2 additions & 3 deletions scripts/custom/provision-10-example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ if echo "${VORTEX_PROVISION_ENVIRONMENT:-}" | grep -q -e dev -e test -e ci -e lo
#;> REDIS

#;< CLAMAV
# @see https://github.com/drevops/vortex/issues/1461
# drush pm:install clamav
# drush config-set clamav.settings mode_daemon_tcpip.hostname clamav
drush pm:install clamav
drush config-set clamav.settings mode_daemon_tcpip.hostname clamav
#;> CLAMAV

#;< SOLR
Expand Down
2 changes: 1 addition & 1 deletion tests/behat/features/clamav.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@clamav @p0 @skipped
@clamav @p0
Feature: ClamAV Anti-virus

Ensure that ClamAV is working correctly.
Expand Down
9 changes: 0 additions & 9 deletions tests/phpunit/Drupal/SwitchableSettingsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ class SwitchableSettingsTest extends SettingsTestCase {

/**
* Test ClamAV configs in Daemon mode with defaults.
*
* @group skipped
* @see https://github.com/drevops/vortex/issues/1461
*/
public function testClamavDaemonCustom(): void {
$this->setEnvVars([
Expand All @@ -42,9 +39,6 @@ public function testClamavDaemonCustom(): void {

/**
* Test ClamAV configs in Executable mode.
*
* @group skipped
* @see https://github.com/drevops/vortex/issues/1461
*/
public function testClamavExecutable(): void {
$this->setEnvVars([
Expand All @@ -63,9 +57,6 @@ public function testClamavExecutable(): void {

/**
* Test ClamAV configs in Daemon mode with defaults.
*
* @group skipped
* @see https://github.com/drevops/vortex/issues/1461
*/
public function testClamavDaemonDefaults(): void {
$this->setEnvVars([
Expand Down

1 comment on commit 7de8744

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.