cnti-testcatalog / testsuite

📞📱☎️📡🌐 Cloud Native Telecom Initiative (CNTI) Test Catalog is a tool to check for and provide feedback on the use of K8s + cloud native best practices in networking applications and platforms
https://wiki.lfnetworking.org/display/LN/Test+Catalog
Apache License 2.0
169 stars 70 forks source link

Change: Cluster setup exception message shortened #2055

Open svteb opened 1 month ago

svteb commented 1 month ago

Description

As explained in the referenced issue, there was an unnecessary stack trace printed out in install_cluster_tools and uninstall_cluster_tools if ./cnf-testsuite setup has not been run. This was remediated by replacing the raise command with puts. Additionally I made the informative message more explicit for new users.

Issues:

Refs: #1926

How has this been tested:

Types of changes:

Checklist:

Documentation

Code Review

Issue

svteb commented 2 weeks ago

I completely forgot to run spec tests, which even discovered the lack of exit code 1 as mentioned by @martin-mat . Additionally I had to edit the spec tests so that they would match the output with the new one.

svteb commented 3 days ago

LGTM, should make spec test output clearer and less confusing. Pls add comment to PR about reason for removing Log.info { "install_cluster_tools" }

The clustertools.install method prints that clustertools installation is ongoing:

  def self.install(host_namespace = true)
    Log.info { "ClusterTools install" }
    if host_namespace
      File.write("cluster_tools.yml", ManifestHostNamespaceTemplate.new().to_s)
    else
      File.write("cluster_tools.yml", ManifestTemplate.new().to_s)
    end
    KubectlClient::Apply.file("cluster_tools.yml", namespace: self.namespace!)
    wait_for_cluster_tools
  end

So just duplication removal.