Skip to content

Commit e56be69

Browse files
committed
Fix spec issues
Signed-off-by: Rafal Lal <rafal.lal@tietoevry.com>
1 parent 78462b5 commit e56be69

4 files changed

Lines changed: 11 additions & 7 deletions

File tree

src/tasks/setup/cnf_setup.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace "setup" do
2222
stdout_success "CNF installation start."
2323
CNFInstall.install_cnf(args)
2424
logger.info { "CNF installed successfuly" }
25-
stdout_success "CNF installation ended."
25+
stdout_success "CNF installation complete."
2626
end
2727

2828
task "cnf_uninstall" do |_, args|

src/tasks/setup/kubescape_setup.cr

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,13 @@ task "kubescape_framework_download" do |_, args|
4444
framework_path = "#{tools_path}/kubescape/nsa.json"
4545
if !File.exists?(framework_path) || installed_framework_version != Setup::KUBESCAPE_FRAMEWORK_VERSION
4646
asset_url = "https://github.com/armosec/regolibrary/releases/download/v#{Setup::KUBESCAPE_FRAMEWORK_VERSION}/nsa"
47-
48-
download(Setup::KUBESCAPE_URL, framework_path,
49-
headers: HTTP::Headers{"Authorization" => "Bearer #{ENV["GITHUB_TOKEN"]}"})
47+
48+
unless ENV["GITHUB_TOKEN"]?.nil?
49+
download(Setup::KUBESCAPE_URL, framework_path,
50+
headers: HTTP::Headers{"Authorization" => "Bearer #{ENV["GITHUB_TOKEN"]}"})
51+
else
52+
download(Setup::KUBESCAPE_URL, framework_path)
53+
end
5054
File.write(version_file, Setup::KUBESCAPE_FRAMEWORK_VERSION)
5155
end
5256
end

src/tasks/workload/microservice.cr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ end
2323
REASONABLE_STARTUP_BUFFER = 10.0
2424

2525
desc "To check if the CNF has multiple microservices that share a database"
26-
task "shared_database", ["install_cluster_tools"] do |t, args|
26+
task "shared_database", ["setup:install_cluster_tools"] do |t, args|
2727
CNFManager::Task.task_runner(args, task: t) do |args, config|
2828
# todo loop through local resources and see if db match found
2929
db_match = Netstat::Mariadb.match
@@ -727,7 +727,7 @@ task "service_discovery" do |t, args|
727727
end
728728

729729
desc "To check if the CNF uses a specialized init system"
730-
task "specialized_init_system", ["install_cluster_tools"] do |t, args|
730+
task "specialized_init_system", ["setup:install_cluster_tools"] do |t, args|
731731
CNFManager::Task.task_runner(args, task: t) do |args, config|
732732
failed_cnf_resources = [] of InitSystems::InitSystemInfo
733733
resources_checked = false

src/tasks/workload/observability.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ task "open_metrics", ["prometheus_traffic"] do |t, args|
179179
end
180180

181181
desc "Are the CNF's logs captured by a logging system"
182-
task "routed_logs", ["install_cluster_tools"] do |t, args|
182+
task "routed_logs", ["setup:install_cluster_tools"] do |t, args|
183183
task_response = CNFManager::Task.task_runner(args, task: t) do |args, config|
184184
fluent_pods = FluentManager.find_active_match_pods()
185185
unless fluent_pods

0 commit comments

Comments
 (0)