Skip to content

Commit

Permalink
Circular Reference Resource Files 2
Browse files Browse the repository at this point in the history
Issue #261
  • Loading branch information
damies13 committed Jul 8, 2024
1 parent e70ac9c commit ca59aa5
Show file tree
Hide file tree
Showing 44 changed files with 375 additions and 5 deletions.
69 changes: 69 additions & 0 deletions Tests/Regression/Manager/CommandLine_Bugs.robot
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,66 @@ Circular Reference Resource Files
... Stop Manager


Circular Reference Resource Files 2
[Tags] windows-latest ubuntu-latest macos-latest Issue #261
VAR ${testdata} ${CURDIR}${/}testdata${/}Issue-#261${/}circular_test2 scope=TEST
Create Testdata Agent INI ${testdata}${/}agent.ini
Create Testdata Manager INI ${testdata}${/}manager.ini

@{expected_files}= List Files In Directory And Sub Directories ${testdata}${/}resources *.resource

@{agnt_options}= Create List -i ${testdata}${/}agent.ini
Run Agent ${agnt_options}
Sleep 1s
Check Agent Is Running
Log to console ${CURDIR}
${scenariofile}= Normalize Path ${CURDIR}${/}testdata${/}Issue-#184${/}Issue-#184.rfs
Log to console ${scenariofile}
@{mngr_options}= Create List -i ${testdata}${/}manager.ini -n
Run Manager CLI ${mngr_options}
Wait For Manager
Stop Agent

${stdout_manager}= Read Log ${OUTPUT DIR}${/}stdout_manager.txt
${stderr_manager}= Read Log ${OUTPUT DIR}${/}stderr_manager.txt
${stdout_agent}= Read Log ${OUTPUT DIR}${/}stdout_agent.txt
${stderr_agent}= Read Log ${OUTPUT DIR}${/}stderr_agent.txt

Should Not Contain ${stdout_manager} RuntimeError
Should Not Contain ${stderr_manager} RuntimeError
Should Not Contain ${stdout_manager} Exception
Should Not Contain ${stderr_manager} Exception

Should Not Contain ${stdout_manager} OSError: [Errno 24] Too many open files
Should Not Contain ${stderr_manager} OSError: [Errno 24] Too many open files
Should Not Contain ${stdout_manager} OSError
Should Not Contain ${stderr_manager} OSError
Should Not Contain ${stdout_manager} Errno 24
Should Not Contain ${stderr_manager} Errno 24
Should Not Contain ${stdout_manager} Too many open files
Should Not Contain ${stderr_manager} Too many open files

Should Not Contain ${stdout_agent} Manager Disconnected

# @{testdata-dir}= List Directory ${testdata}
# Log testdata-dir: ${testdata-dir} console=True
# @{agent-dir}= List Directory ${testdata}${/}agent-dir
# Log agent-dir: ${agent-dir} console=True
# @{scripts-dir}= List Directory ${testdata}${/}agent-dir${/}scripts
# Log scripts-dir: ${scripts-dir} console=True

# @{result_files}= List Files In Directory And Sub Directories ${testdata}${/}agent-dir${/}scripts${/}resources *.resource
@{result_files}= List Files In Directory And Sub Directories ${agent_dir}${/}scripts${/}resources *.resource
# @{result_files}= List Files In Directory And Sub Directories ${agent_dir}${/}scripts *.resource


Diff Lists ${expected_files} ${result_files} Agent didn't get all files from manager

[Teardown] Run Keywords
... Stop Agent AND
... Stop Manager


Lots Of Resource Files
[Tags] windows-latest ubuntu-latest macos-latest Issue #261
VAR ${testdata} ${CURDIR}${/}testdata${/}Issue-#261${/}lotsa_files_test scope=TEST
Expand Down Expand Up @@ -154,6 +214,15 @@ Lots Of Resource Files

Should Not Contain ${stdout_agent} Manager Disconnected

# @{testdata-dir}= List Directory ${testdata}
# Log testdata-dir: ${testdata-dir} console=True
# @{agent-dir}= List Directory ${testdata}${/}agent-dir
# Log agent-dir: ${agent-dir} console=True
@{scripts-dir}= List Directory ${agent_dir}${/}scripts
Log scripts-dir: ${scripts-dir}
@{resources-dir}= List Directory ${agent_dir}${/}scripts${/}resources
Log scripts-dir: ${resources-dir}

# @{result_files}= List Files In Directory And Sub Directories ${testdata}${/}agent-dir${/}scripts${/}resources *.resource
@{result_files}= List Files In Directory And Sub Directories ${agent_dir}${/}scripts${/}resources *.resource

Expand Down
1 change: 1 addition & 0 deletions Tests/Regression/Manager/CommandLine_Common.robot
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Run Agent
${options}= Create List
END
Append To List ${options} -d ${agent_dir}
Empty Directory ${agent_dir}

Log to console ${\n}\${options}: ${options}
# ${process}= Start Process python3 ${pyfile_agent} @{options} alias=Agent stdout=${OUTPUT DIR}${/}stdout_agent.txt stderr=${OUTPUT DIR}${/}stderr_agent.txt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Resource resources/folder-2/b.resource
Metadata File resources/config.yaml
Suite Teardown Close All Browsers
# Suite Teardown Close All Browsers
*** Test Cases ***
Basic test
Keyword A
Keyword B
Keyword B
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Agent]
agentname = E-5CG2026KN2
agentdir = C:\Users\Dave\Documents\tests\agent-dir
xmlmode = False
excludelibraries = BuiltIn,String,OperatingSystem,perftest
properties =
swarmmanager = http://localhost:8138/
robotcmd = robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[GUI]
win_width = 1280
win_height = 720
graph_list =

[Plan]
scriptdir = C:\Users\Dave\Documents\tests\
scenariodir = C:\Users\Dave\Documents\tests\
scenariofile = C:\Users\Dave\Documents\tests\scenario.rfs

[Run]
resultsdir = C:\Users\Dave\Documents\tests\results
display_index = False
display_iteration = False
display_sequence = False
display_percentile = 90

[Server]
bindip =
bindport = 8138
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from robot.api.deco import keyword, library


@library(scope='GLOBAL', auto_keywords=True)
class BrowserLib:
pass
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from robot.api.deco import keyword, library
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from robot.api.deco import keyword, library
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from robot.api.deco import library, keyword
from sshtunnel import SSHTunnelForwarder


@library(scope='GLOBAL', auto_keywords=True)
class SSHTunnelManager:
pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*** Settings ***
Library Collections
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*** Settings ***
Library Collections
Library OperatingSystem
Library JSONLibrary
Library KubeLibrary
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*** Settings ***
Library Collections
Library OperatingSystem
Library String
Library JSONLibrary
Library KubeLibrary
Resource builtin-ext.resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*** Settings ***
Library Collections
Library ../../core-common/libs/DatabaseLibrary/
Resource ssh.resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*** Settings ***
Library String
Library SSHLibrary
Library ../../core-common/libs/SSHTunnelManager.py
Resource ../../core-common/resources/builtin-ext.resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*** Settings ***
Library OperatingSystem
Library ../libs/DatabaseLibrary/
Resource certificate.resource
Resource kubelibrary.resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*** Settings ***
Library ../../../robot-dashboard/library/utility.py
Resource ../../../robot-dashboard/resources/Generic_Resources/generic.resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*** Settings ***
Library SeleniumLibrary implicit_wait=2s
Resource ../ui.resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*** Settings ***
Resource ../ui.resource
Resource ui-common.resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*** Settings ***
Resource page-common.resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*** Settings ***
Resource ui-browser.resource
Resource ui-notif-handling.resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*** Settings ***
Resource ui-common.resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*** Settings ***
Resource ui-common.resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*** Settings ***
Resource ui-common.resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*** Settings ***
Resource ui-common.resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*** Settings ***
Resource ui-common.resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*** Settings ***
Library Collections
Library Process
Library String
Library SeleniumLibrary
Library ../../core-common/libs/BrowserLib.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import codecs
import csv
import math
import os
import re
import shutil
import time
import zipfile
import json
import urllib

from cmath import log10
from datetime import datetime
from decimal import Decimal
from io import StringIO

import chardet
import pandas as pd
import pyperclip
import xmltodict
from PIL import Image
from robot.api.deco import keyword, library
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*** Settings ***
Resource generic.resource
Resource ../../../core-ui/resources/generic-resources/data-formatting.resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*** Settings ***
Resource generic.resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
*** Settings ***
Library SSHLibrary
Library OperatingSystem
Library Collections
Library String
Library ../../library/utility.py
Library Process
Resource page_common.resource
Resource login_dashboard.resource
Resource ../../../core-common/resources/vertica.resource
Resource ../../../core-common/resources/kubelibrary.resource
Resource fetch_data.resource
Resource fetch_metadata.resource
Resource ../../../core-common/resources/spotfire-config-database.resource
Resource ../../../core-ui/resources/generic-resources/data-formatting.resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*** Settings ***
Resource ../../../core-ui/resources/generic-resources/ui-login.resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*** Settings ***
Library SeleniumLibrary implicit_wait=1s
Library String
Library Collections
Library ../../library/utility.py
Resource ../../../core-ui/resources/generic-resources/page-common.resource
Resource ../../../core-ui/resources/generic-resources/ui-common.resource
Resource ../../../core-ui/resources/generic-resources/ui-browser.resource
Resource ../../../core-ui/resources/generic-resources/ui-login.resource
Resource ../../../core-ui/resources/generic-resources/ui-notif-handling.resource
Resource ../../../core-ui/resources/generic-resources/ui-sf-menu.resource
Resource ../../../core-ui/resources/generic-resources/ui-vis-change.resource
Resource ../../../core-ui/resources/generic-resources/ui-vis-lists.resource
Resource ../../../core-ui/resources/generic-resources/ui-vis-tables.resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*** Settings ***
Library DateTime
Resource ../../resources/Generic_Resources/generic.resource
Resource ../../resources/KPIIA_Resources/fetching_data.resource
Resource ../../resources/KPIIA_Resources/page_kpiia.resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*** Settings ***
Library DateTime
Resource ../../resources/Generic_Resources/generic.resource
Resource ../../resources/Generic_Resources/fetch_metadata.resource
Resource ../../resources/Generic_Resources/fetch_data.resource
Resource ../../resources/KPIIA_Resources/page_kpiia.resource
Resource ../../resources/KPIIA_Resources/marking_timecharts.resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*** Settings ***
Resource ../../resources/Generic_Resources/generic.resource
Resource ../../resources/KPIIA_Resources/page_kpiia.resource
Resource ../../resources/KPIIA_Resources/fetching_data.resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*** Settings ***
Resource ../../resources/Generic_Resources/generic.resource
Resource ../../resources/Generic_Resources/page_common.resource
Loading

0 comments on commit ca59aa5

Please sign in to comment.