Skip to content

Commit

Permalink
removed unused params
Browse files Browse the repository at this point in the history
  • Loading branch information
vdelendik committed Sep 11, 2020
1 parent b59857b commit e95cb8b
Showing 1 changed file with 15 additions and 23 deletions.
38 changes: 15 additions & 23 deletions listener/ZafiraListener.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using NLog;
using NUnit.Framework;
using NUnit.Framework.Interfaces;
using System;
using System.Configuration;
using System.IO;
Expand All @@ -14,16 +15,10 @@ public class ZafiraListener

private static Logger logger = LogManager.GetCurrentClassLogger();
private static string ANONYMOUS = "anonymous";
private string JIRA_SUITE_ID;
private string ZAFIRA_URL;
private string ZAFIRA_ACCESS_TOKEN;
private string ZAFIRA_PROJECT;
private string ZAFIRA_REPORT_EMAILS;
private string ZAFIRA_REPORT_FOLDER;
private bool ZAFIRA_RERUN_FAILURES;
private bool ZAFIRA_REPORT_SHOW_STACKTRACE;
private bool ZAFIRA_REPORT_SHOW_FAILURES_ONLY;
private string ZAFIRA_CONFIGURATOR;
private CIConfig ci;
private ZafiraClient zc;
private UserType user;
Expand All @@ -36,7 +31,7 @@ public class ZafiraListener
[ThreadStatic]
private static TestCaseType testCase;

private bool isEnabled;
private bool isEnabled = false;
private bool isAvailable = false;
private bool isInitialized = false;

Expand Down Expand Up @@ -113,21 +108,24 @@ public void OnFinish()

private void InitZafira(AttributeTargets attributeTarget)
{
if (!isInitialized)
isEnabled = GetBoolean("isEnabled", false);
if (!isEnabled)
{
logger.Info("Attempting to start up Zafira Listener...");
} else
logger.Info("Zafira is not enabled");
return;
}

if (isInitialized)
{
logger.Info("Zafira already initialized");
return;
}


logger.Info("Attempting to init Zafira Client...");

try
{
ci = new CIConfig();
isEnabled = GetBoolean("isEnabled", false);

ci.setCiRunId(GetString("ci_run_id", Guid.NewGuid().ToString()));
ci.setCiUrl(GetString("ci_url", "http://localhost:8080/job/unavailable"));
ci.setCiBuild(GetString("ci_build", null));
Expand All @@ -142,16 +140,10 @@ private void InitZafira(AttributeTargets attributeTarget)
ci.setGitCommit(GetString("git_commit", null));
ci.setGitUrl(GetString("git_url", null));

JIRA_SUITE_ID = GetString("jira_suite_id", null);
ZAFIRA_URL = GetString("zafira_service_url", "http://demo.qaprosoft.com/zafira-ws");
ZAFIRA_ACCESS_TOKEN = GetString("zafira_access_token", "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyIiwicGFzc3dvcmQiOiIySDl5ZVhNcWoxb1lLVm1WZlYxY28vZ3ZYdmRHejdxTiIsImV4cCI6MTMwMzY3NTM4MTk1fQ.yqp4BJd7OpgX7aOdQOjGKdYb2DvHK2ds6ilc0MoO6p_vkbZhkjIK-eCr8dhT7Riwj8x6ru0Lup6Zj-FithCfOw");
ZAFIRA_PROJECT = GetString("zafira_project", "DemoTest");
ZAFIRA_REPORT_EMAILS = GetString("zafira_report_emails", "demoqaprosoft@gmail.com").Trim().Replace(" ", ",").Replace(";", ",");
ZAFIRA_REPORT_FOLDER = GetString("zafira_report_folder", "FOLDER_PATH");
ZAFIRA_RERUN_FAILURES = GetBoolean("zafira_rerun_failures", false);
ZAFIRA_REPORT_SHOW_STACKTRACE = GetBoolean("zafira_report_show_stacktrace", true);
ZAFIRA_REPORT_SHOW_FAILURES_ONLY = GetBoolean("zafira_report_failures_only", false);
ZAFIRA_CONFIGURATOR = GetString("zafira_configurator", "com.qaprosoft.zafira.listener.DefaultConfigurator");
ZAFIRA_URL = GetString("zafira_service_url", "http://demo.qaprosoft.com");
ZAFIRA_ACCESS_TOKEN = GetString("zafira_access_token", "");
ZAFIRA_PROJECT = GetString("zafira_project", "UNKNOWN");
ZAFIRA_REPORT_EMAILS = GetString("zafira_report_emails", "").Trim().Replace(" ", ",").Replace(";", ",");

if (isEnabled)
{
Expand Down

0 comments on commit e95cb8b

Please sign in to comment.