cosmos 3.2.1 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Manifest.txt +195 -0
- data/README.md +3 -3
- data/data/crc.txt +52 -52
- data/lib/cosmos.rb +1 -1
- data/lib/cosmos/core_ext/time.rb +11 -9
- data/lib/cosmos/gui/choosers/telemetry_chooser.rb +0 -2
- data/lib/cosmos/gui/dialogs/about_dialog.rb +2 -2
- data/lib/cosmos/gui/dialogs/exception_dialog.rb +2 -2
- data/lib/cosmos/gui/dialogs/progress_dialog.rb +11 -5
- data/lib/cosmos/gui/dialogs/splash.rb +32 -10
- data/lib/cosmos/gui/dialogs/tlm_details_dialog.rb +1 -1
- data/lib/cosmos/gui/line_graph/line_graph_drawing.rb +2 -2
- data/lib/cosmos/gui/qt.rb +22 -22
- data/lib/cosmos/io/json_drb.rb +4 -4
- data/lib/cosmos/io/json_rpc.rb +21 -21
- data/lib/cosmos/packet_logs/packet_log_writer.rb +18 -20
- data/lib/cosmos/packets/commands.rb +8 -6
- data/lib/cosmos/packets/limits.rb +3 -2
- data/lib/cosmos/packets/packet.rb +14 -11
- data/lib/cosmos/packets/parsers/limits_parser.rb +1 -1
- data/lib/cosmos/packets/parsers/macro_parser.rb +4 -4
- data/lib/cosmos/packets/parsers/state_parser.rb +1 -1
- data/lib/cosmos/packets/structure.rb +2 -2
- data/lib/cosmos/packets/telemetry.rb +5 -4
- data/lib/cosmos/script/script.rb +6 -6
- data/lib/cosmos/streams/tcpip_socket_stream.rb +2 -1
- data/lib/cosmos/streams/template_stream_protocol.rb +1 -1
- data/lib/cosmos/tools/cmd_sender/cmd_sender.rb +1 -1
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb +5 -8
- data/lib/cosmos/tools/cmd_tlm_server/gui/interfaces_tab.rb +4 -3
- data/lib/cosmos/tools/cmd_tlm_server/gui/packets_tab.rb +9 -3
- data/lib/cosmos/tools/cmd_tlm_server/gui/status_tab.rb +15 -11
- data/lib/cosmos/tools/data_viewer/data_viewer.rb +1 -1
- data/lib/cosmos/tools/data_viewer/data_viewer_component.rb +2 -2
- data/lib/cosmos/tools/handbook_creator/handbook_creator.rb +2 -2
- data/lib/cosmos/tools/handbook_creator/handbook_creator_config.rb +0 -2
- data/lib/cosmos/tools/limits_monitor/limits_monitor.rb +1 -1
- data/lib/cosmos/tools/replay/replay.rb +2 -2
- data/lib/cosmos/tools/script_runner/script_audit.rb +1 -1
- data/lib/cosmos/tools/script_runner/script_runner.rb +1 -1
- data/lib/cosmos/tools/script_runner/script_runner_frame.rb +3 -7
- data/lib/cosmos/tools/table_manager/table_config.rb +1 -1
- data/lib/cosmos/tools/test_runner/results_writer.rb +1 -1
- data/lib/cosmos/tools/test_runner/test_runner.rb +2 -2
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor.rb +2 -1
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor_processor.rb +1 -1
- data/lib/cosmos/tools/tlm_grapher/data_object_adders/xy_data_object_adder.rb +1 -0
- data/lib/cosmos/tools/tlm_grapher/data_object_editors/housekeeping_data_object_editor.rb +1 -0
- data/lib/cosmos/tools/tlm_grapher/data_object_editors/xy_data_object_editor.rb +1 -0
- data/lib/cosmos/tools/tlm_grapher/tabbed_plots/overview_tabbed_plots.rb +3 -3
- data/lib/cosmos/tools/tlm_viewer/tlm_viewer.rb +1 -3
- data/lib/cosmos/top_level.rb +2 -6
- data/lib/cosmos/utilities/ruby_lex_utils.rb +1 -1
- data/lib/cosmos/version.rb +5 -5
- data/lib/cosmos/win32/win32_main.rb +11 -7
- data/spec/ccsds/ccsds_packet_spec.rb +28 -28
- data/spec/ccsds/ccsds_parser_spec.rb +27 -27
- data/spec/config/config_parser_spec.rb +88 -88
- data/spec/conversions/conversion_spec.rb +3 -3
- data/spec/conversions/generic_conversion_spec.rb +9 -9
- data/spec/conversions/new_packet_log_conversion_spec.rb +4 -4
- data/spec/conversions/polynomial_conversion_spec.rb +7 -7
- data/spec/conversions/processor_conversion_spec.rb +9 -9
- data/spec/conversions/received_count_conversion_spec.rb +7 -7
- data/spec/conversions/received_time_formatted_conversion_spec.rb +9 -9
- data/spec/conversions/received_time_seconds_conversion_spec.rb +9 -9
- data/spec/conversions/segmented_polynomial_conversion_spec.rb +11 -11
- data/spec/conversions/unix_time_formatted_conversion_spec.rb +13 -13
- data/spec/conversions/unix_time_seconds_conversion_spec.rb +13 -13
- data/spec/core_ext/array_spec.rb +76 -76
- data/spec/core_ext/class_spec.rb +3 -3
- data/spec/core_ext/cosmos_io_spec.rb +16 -16
- data/spec/core_ext/exception_spec.rb +19 -19
- data/spec/core_ext/file_spec.rb +16 -16
- data/spec/core_ext/hash_spec.rb +3 -3
- data/spec/core_ext/io_spec.rb +2 -2
- data/spec/core_ext/kernel_spec.rb +2 -2
- data/spec/core_ext/math_spec.rb +43 -43
- data/spec/core_ext/matrix_spec.rb +22 -22
- data/spec/core_ext/objectspace_spec.rb +6 -6
- data/spec/core_ext/range_spec.rb +2 -2
- data/spec/core_ext/socket_spec.rb +4 -4
- data/spec/core_ext/string_spec.rb +67 -67
- data/spec/core_ext/stringio_spec.rb +2 -2
- data/spec/core_ext/time_spec.rb +82 -82
- data/spec/gui/line_graph/line_clip_spec.rb +34 -34
- data/spec/interfaces/interface_spec.rb +46 -46
- data/spec/interfaces/linc_interface_spec.rb +26 -26
- data/spec/interfaces/serial_interface_spec.rb +16 -16
- data/spec/interfaces/simulated_target_interface_spec.rb +21 -21
- data/spec/interfaces/stream_interface_spec.rb +22 -22
- data/spec/interfaces/tcpip_client_interface_spec.rb +14 -14
- data/spec/interfaces/tcpip_server_interface_spec.rb +41 -41
- data/spec/interfaces/udp_interface_spec.rb +46 -46
- data/spec/io/buffered_file_spec.rb +50 -50
- data/spec/io/io_multiplexer_spec.rb +9 -9
- data/spec/io/json_drb_object_spec.rb +7 -7
- data/spec/io/json_drb_spec.rb +55 -55
- data/spec/io/json_rpc_spec.rb +68 -68
- data/spec/io/raw_logger_pair_spec.rb +28 -28
- data/spec/io/raw_logger_spec.rb +22 -22
- data/spec/io/serial_driver_spec.rb +3 -3
- data/spec/io/stderr_spec.rb +2 -2
- data/spec/io/stdout_spec.rb +2 -2
- data/spec/io/tcpip_server_spec.rb +62 -62
- data/spec/io/udp_sockets_spec.rb +19 -19
- data/spec/io/win32_serial_driver_spec.rb +10 -10
- data/spec/packet_logs/meta_packet_log_writer_spec.rb +32 -32
- data/spec/packet_logs/packet_log_reader_spec.rb +138 -138
- data/spec/packet_logs/packet_log_writer_pair_spec.rb +3 -3
- data/spec/packet_logs/packet_log_writer_spec.rb +26 -26
- data/spec/packets/binary_accessor_spec.rb +672 -672
- data/spec/packets/commands_spec.rb +123 -123
- data/spec/packets/limits_response_spec.rb +1 -1
- data/spec/packets/limits_spec.rb +69 -69
- data/spec/packets/packet_config_spec.rb +93 -93
- data/spec/packets/packet_item_limits_spec.rb +46 -46
- data/spec/packets/packet_item_spec.rb +108 -108
- data/spec/packets/packet_spec.rb +364 -348
- data/spec/packets/parsers/format_string_parser_spec.rb +13 -13
- data/spec/packets/parsers/limits_parser_spec.rb +8 -8
- data/spec/packets/parsers/limits_response_parser_spec.rb +9 -9
- data/spec/packets/parsers/macro_parser_spec.rb +34 -6
- data/spec/packets/parsers/packet_parser_spec.rb +6 -6
- data/spec/packets/parsers/processor_parser_spec.rb +7 -7
- data/spec/packets/parsers/state_parser_spec.rb +23 -23
- data/spec/packets/structure_item_spec.rb +62 -62
- data/spec/packets/structure_spec.rb +183 -183
- data/spec/packets/telemetry_spec.rb +174 -174
- data/spec/processors/new_packet_log_processor_spec.rb +4 -4
- data/spec/processors/processor_spec.rb +9 -9
- data/spec/processors/statistics_processor_spec.rb +21 -21
- data/spec/processors/watermark_processor_spec.rb +12 -12
- data/spec/script/script_spec.rb +158 -158
- data/spec/spec_helper.rb +44 -13
- data/spec/streams/burst_stream_protocol_spec.rb +8 -8
- data/spec/streams/fixed_stream_protocol_spec.rb +26 -26
- data/spec/streams/length_stream_protocol_spec.rb +27 -27
- data/spec/streams/preidentified_stream_protocol_spec.rb +25 -25
- data/spec/streams/serial_stream_spec.rb +19 -19
- data/spec/streams/stream_protocol_spec.rb +52 -52
- data/spec/streams/stream_spec.rb +1 -1
- data/spec/streams/tcpip_client_stream_spec.rb +7 -7
- data/spec/streams/tcpip_socket_stream_spec.rb +84 -49
- data/spec/streams/template_stream_protocol_spec.rb +17 -17
- data/spec/streams/terminated_stream_protocol_spec.rb +19 -19
- data/spec/system/system_spec.rb +95 -95
- data/spec/system/target_spec.rb +32 -32
- data/spec/tools/cmd_tlm_server/api_spec.rb +386 -386
- data/spec/tools/cmd_tlm_server/background_task_spec.rb +3 -3
- data/spec/tools/cmd_tlm_server/background_tasks_spec.rb +8 -8
- data/spec/tools/cmd_tlm_server/cmd_tlm_server_config_spec.rb +57 -57
- data/spec/tools/cmd_tlm_server/cmd_tlm_server_spec.rb +85 -85
- data/spec/tools/cmd_tlm_server/commanding_spec.rb +11 -11
- data/spec/tools/cmd_tlm_server/connections_spec.rb +23 -23
- data/spec/tools/cmd_tlm_server/interface_thread_spec.rb +57 -57
- data/spec/tools/cmd_tlm_server/interfaces_spec.rb +32 -32
- data/spec/tools/cmd_tlm_server/packet_logging_spec.rb +17 -17
- data/spec/tools/cmd_tlm_server/router_thread_spec.rb +15 -15
- data/spec/tools/cmd_tlm_server/routers_spec.rb +36 -36
- data/spec/top_level/top_level_spec.rb +60 -60
- data/spec/utilities/crc_spec.rb +6 -6
- data/spec/utilities/csv_spec.rb +13 -13
- data/spec/utilities/logger_spec.rb +20 -20
- data/spec/utilities/message_log_spec.rb +13 -13
- data/spec/utilities/quaternion_spec.rb +30 -30
- data/spec/utilities/ruby_lex_utils_spec.rb +14 -14
- data/test/benchmarks/binary_accessor_benchmark.rb +14 -0
- data/test/benchmarks/gsub_benchmark.rb +114 -0
- data/test/performance/PACKETS.bat +1 -0
- data/test/performance/Rakefile +77 -0
- data/test/performance/THREADS.bat +1 -0
- data/test/performance/config/data/attitude.bin +0 -0
- data/test/performance/config/data/crc.txt +206 -0
- data/test/performance/config/data/diamond.STL +58 -0
- data/test/performance/config/data/groundoff.gif +0 -0
- data/test/performance/config/data/groundon.gif +0 -0
- data/test/performance/config/data/hselectoff.gif +0 -0
- data/test/performance/config/data/hselecton.gif +0 -0
- data/test/performance/config/data/hswitchoff.gif +0 -0
- data/test/performance/config/data/hswitchon.gif +0 -0
- data/test/performance/config/data/meta_init.txt +4 -0
- data/test/performance/config/data/position.bin +0 -0
- data/test/performance/config/data/poweroff.gif +0 -0
- data/test/performance/config/data/poweron.gif +0 -0
- data/test/performance/config/data/satellite.gif +0 -0
- data/test/performance/config/data/tada.wav +0 -0
- data/test/performance/config/data/vswitchoff.gif +0 -0
- data/test/performance/config/data/vswitchon.gif +0 -0
- data/test/performance/config/system/system_packets.txt +39 -0
- data/test/performance/config/system/system_threads.txt +59 -0
- data/test/performance/config/targets/COSMOS/cmd_tlm/cosmos_server_cmds.txt +41 -0
- data/test/performance/config/targets/COSMOS/cmd_tlm/cosmos_server_tlm.txt +15 -0
- data/test/performance/config/targets/COSMOS/cmd_tlm_server.txt +6 -0
- data/test/performance/config/targets/COSMOS/screens/limits_change.txt +20 -0
- data/test/performance/config/targets/COSMOS/screens/version.txt +19 -0
- data/test/performance/config/targets/COSMOS/target.txt +11 -0
- data/test/performance/config/targets/EXAMPLE/cmd_tlm/example_cmds.txt +17 -0
- data/test/performance/config/targets/EXAMPLE/cmd_tlm/example_tlm.txt +18 -0
- data/test/performance/config/targets/EXAMPLE/cmd_tlm_server.txt +6 -0
- data/test/performance/config/targets/EXAMPLE/lib/example_interface.rb +22 -0
- data/test/performance/config/targets/EXAMPLE/target.txt +7 -0
- data/test/performance/config/targets/SYSTEM/screens/status.txt +12 -0
- data/test/performance/config/tools/cmd_tlm_server/cmd_tlm_server_packets.txt +34 -0
- data/test/performance/config/tools/cmd_tlm_server/cmd_tlm_server_threads.txt +68 -0
- data/test/performance/config/tools/data_viewer/data_viewer.txt +11 -0
- data/test/performance/config/tools/handbook_creator/default_toc.xsl +59 -0
- data/test/performance/config/tools/handbook_creator/handbook_creator.txt +66 -0
- data/test/performance/config/tools/handbook_creator/templates/command_packets.html.erb +86 -0
- data/test/performance/config/tools/handbook_creator/templates/command_toc.html.erb +38 -0
- data/test/performance/config/tools/handbook_creator/templates/footer.html.erb +9 -0
- data/test/performance/config/tools/handbook_creator/templates/header.html.erb +25 -0
- data/test/performance/config/tools/handbook_creator/templates/limits_groups.html.erb +13 -0
- data/test/performance/config/tools/handbook_creator/templates/nav.html.erb +27 -0
- data/test/performance/config/tools/handbook_creator/templates/overview.html.erb +1 -0
- data/test/performance/config/tools/handbook_creator/templates/pdf_cover.html.erb +23 -0
- data/test/performance/config/tools/handbook_creator/templates/pdf_footer.html.erb +33 -0
- data/test/performance/config/tools/handbook_creator/templates/pdf_header.html.erb +41 -0
- data/test/performance/config/tools/handbook_creator/templates/telemetry_packets.html.erb +80 -0
- data/test/performance/config/tools/handbook_creator/templates/telemetry_toc.html.erb +38 -0
- data/test/performance/config/tools/handbook_creator/templates/title.html.erb +1 -0
- data/test/performance/config/tools/launcher/launcher_packets.txt +29 -0
- data/test/performance/config/tools/launcher/launcher_threads.txt +70 -0
- data/test/performance/config/tools/limits_monitor/README.txt +1 -0
- data/test/performance/config/tools/opengl_builder/README.txt +1 -0
- data/test/performance/config/tools/script_runner/script_runner.txt +3 -0
- data/test/performance/config/tools/table_manager/ConfigTables_def.txt +8 -0
- data/test/performance/config/tools/table_manager/ExampleTableDefinition.txt +24 -0
- data/test/performance/config/tools/table_manager/MCConfigurationTable_fsw1_def.txt +25 -0
- data/test/performance/config/tools/table_manager/MCConfigurationTable_fsw2_def.txt +25 -0
- data/test/performance/config/tools/table_manager/PPSSelectionTable_def.txt +8 -0
- data/test/performance/config/tools/table_manager/TLMMonitoringTable_def.txt +248 -0
- data/test/performance/config/tools/test_runner/test_runner.txt +17 -0
- data/test/performance/config/tools/tlm_extractor/tlm_extractor.txt +13 -0
- data/test/performance/config/tools/tlm_extractor/tlm_extractor2.txt +2 -0
- data/test/performance/config/tools/tlm_extractor/tlm_extractor3.txt +2 -0
- data/test/performance/config/tools/tlm_extractor/tlm_extractor4.txt +2 -0
- data/test/performance/config/tools/tlm_grapher/README.txt +1 -0
- data/test/performance/config/tools/tlm_viewer/tlm_viewer.txt +41 -0
- data/test/performance/lib/example_background_task.rb +57 -0
- data/test/performance/lib/example_target.rb +120 -0
- data/test/performance/lib/scpi_target.rb +74 -0
- data/test/performance/lib/user_version.rb +3 -0
- data/test/performance/outputs/handbooks/README.txt +1 -0
- data/test/performance/outputs/logs/README.txt +1 -0
- data/test/performance/outputs/saved_config/README.txt +1 -0
- data/test/performance/outputs/tables/README.txt +1 -0
- data/test/performance/outputs/tmp/README.txt +1 -0
- data/test/performance/procedures/checks.rb +11 -0
- data/test/performance/procedures/clear_util.rb +7 -0
- data/test/performance/procedures/collect.rb +18 -0
- data/test/performance/procedures/collect_util.rb +14 -0
- data/test/performance/procedures/cosmos_api_test.rb +293 -0
- data/test/performance/procedures/disconnect.rb +29 -0
- data/test/performance/procedures/example_test.rb +182 -0
- data/test/performance/procedures/plot_test.rb +8 -0
- data/test/performance/procedures/procedure.rb +3 -0
- data/test/performance/procedures/run_example_test.rb +3 -0
- data/test/performance/procedures/test.rb +51 -0
- data/test/performance/tools/CmdExtractor +14 -0
- data/test/performance/tools/CmdExtractor.bat +59 -0
- data/test/performance/tools/CmdSender +14 -0
- data/test/performance/tools/CmdSender.bat +59 -0
- data/test/performance/tools/CmdTlmServer +16 -0
- data/test/performance/tools/CmdTlmServer.bat +59 -0
- data/test/performance/tools/CmdTlmServerMemProf +20 -0
- data/test/performance/tools/CmdTlmServerMemProf.bat +59 -0
- data/test/performance/tools/DataViewer +14 -0
- data/test/performance/tools/DataViewer.bat +59 -0
- data/test/performance/tools/ExampleTarget +14 -0
- data/test/performance/tools/ExampleTarget.bat +59 -0
- data/test/performance/tools/HandbookCreator +14 -0
- data/test/performance/tools/HandbookCreator.bat +61 -0
- data/test/performance/tools/Launcher +14 -0
- data/test/performance/tools/Launcher.bat +59 -0
- data/test/performance/tools/LimitsMonitor +14 -0
- data/test/performance/tools/LimitsMonitor.bat +59 -0
- data/test/performance/tools/OpenGLBuilder +14 -0
- data/test/performance/tools/OpenGLBuilder.bat +59 -0
- data/test/performance/tools/PacketViewer +14 -0
- data/test/performance/tools/PacketViewer.bat +59 -0
- data/test/performance/tools/Replay +14 -0
- data/test/performance/tools/Replay.bat +59 -0
- data/test/performance/tools/ScpiTarget +14 -0
- data/test/performance/tools/ScpiTarget.bat +59 -0
- data/test/performance/tools/ScriptRunner +14 -0
- data/test/performance/tools/ScriptRunner.bat +59 -0
- data/test/performance/tools/TableManager +14 -0
- data/test/performance/tools/TableManager.bat +59 -0
- data/test/performance/tools/TestRunner +14 -0
- data/test/performance/tools/TestRunner.bat +59 -0
- data/test/performance/tools/TlmExtractor +14 -0
- data/test/performance/tools/TlmExtractor.bat +59 -0
- data/test/performance/tools/TlmGrapher +14 -0
- data/test/performance/tools/TlmGrapher.bat +59 -0
- data/test/performance/tools/TlmViewer +14 -0
- data/test/performance/tools/TlmViewer.bat +59 -0
- data/test/performance/tools/mac/CmdExtractor.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/CmdExtractor.app/Contents/MacOS/CmdExtractor.rb +15 -0
- data/test/performance/tools/mac/CmdExtractor.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/CmdExtractor.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/CmdSender.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/CmdSender.app/Contents/MacOS/CmdSender.rb +15 -0
- data/test/performance/tools/mac/CmdSender.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/CmdSender.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/CmdTlmServer.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/CmdTlmServer.app/Contents/MacOS/CmdTlmServer.rb +15 -0
- data/test/performance/tools/mac/CmdTlmServer.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/CmdTlmServer.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/DataViewer.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/DataViewer.app/Contents/MacOS/DataViewer.rb +15 -0
- data/test/performance/tools/mac/DataViewer.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/DataViewer.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/HandbookCreator.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/HandbookCreator.app/Contents/MacOS/HandbookCreator.rb +15 -0
- data/test/performance/tools/mac/HandbookCreator.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/HandbookCreator.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/Launcher.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/Launcher.app/Contents/MacOS/Launcher.rb +15 -0
- data/test/performance/tools/mac/Launcher.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/Launcher.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/LimitsMonitor.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/LimitsMonitor.app/Contents/MacOS/LimitsMonitor.rb +15 -0
- data/test/performance/tools/mac/LimitsMonitor.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/LimitsMonitor.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/OpenGLBuilder.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/OpenGLBuilder.app/Contents/MacOS/OpenGLBuilder.rb +15 -0
- data/test/performance/tools/mac/OpenGLBuilder.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/OpenGLBuilder.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/PacketViewer.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/PacketViewer.app/Contents/MacOS/PacketViewer.rb +15 -0
- data/test/performance/tools/mac/PacketViewer.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/PacketViewer.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/Replay.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/Replay.app/Contents/MacOS/Replay.rb +15 -0
- data/test/performance/tools/mac/Replay.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/Replay.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/ScriptRunner.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/ScriptRunner.app/Contents/MacOS/ScriptRunner.rb +15 -0
- data/test/performance/tools/mac/ScriptRunner.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/ScriptRunner.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/TableManager.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/TableManager.app/Contents/MacOS/TableManager.rb +15 -0
- data/test/performance/tools/mac/TableManager.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/TableManager.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/TestRunner.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/TestRunner.app/Contents/MacOS/TestRunner.rb +15 -0
- data/test/performance/tools/mac/TestRunner.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/TestRunner.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/TlmExtractor.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/TlmExtractor.app/Contents/MacOS/TlmExtractor.rb +15 -0
- data/test/performance/tools/mac/TlmExtractor.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/TlmExtractor.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/TlmGrapher.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/TlmGrapher.app/Contents/MacOS/TlmGrapher.rb +15 -0
- data/test/performance/tools/mac/TlmGrapher.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/TlmGrapher.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/tools/mac/TlmViewer.app/Contents/Info.plist +38 -0
- data/test/performance/tools/mac/TlmViewer.app/Contents/MacOS/TlmViewer.rb +15 -0
- data/test/performance/tools/mac/TlmViewer.app/Contents/MacOS/main.sh +6 -0
- data/test/performance/tools/mac/TlmViewer.app/Contents/Resources/appIcon.icns +0 -0
- data/test/performance/userpath.txt +1 -0
- metadata +197 -2
@@ -17,14 +17,14 @@ module Cosmos
|
|
17
17
|
describe BackgroundTask do
|
18
18
|
|
19
19
|
describe "call" do
|
20
|
-
it "
|
20
|
+
it "raises an error" do
|
21
21
|
expect { BackgroundTask.new.call }.to raise_error
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
25
|
describe "stop" do
|
26
|
-
it "
|
27
|
-
BackgroundTask.new.
|
26
|
+
it "exists" do
|
27
|
+
expect(BackgroundTask.new).to respond_to(:stop)
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
@@ -22,7 +22,7 @@ module Cosmos
|
|
22
22
|
end
|
23
23
|
|
24
24
|
describe "start, stop" do
|
25
|
-
it "
|
25
|
+
it "calls start on each task" do
|
26
26
|
File.open(File.join(Cosmos::USERPATH,'lib','my_bg_task1.rb'),'w') do |file|
|
27
27
|
file.puts "require 'cosmos/tools/cmd_tlm_server/background_task'"
|
28
28
|
file.puts "class MyBgTask1 < Cosmos::BackgroundTask"
|
@@ -38,16 +38,16 @@ module Cosmos
|
|
38
38
|
bt.start
|
39
39
|
sleep 0.1
|
40
40
|
# 2 because the RSpec main thread plus the background task
|
41
|
-
Thread.list.length.
|
41
|
+
expect(Thread.list.length).to eql(2)
|
42
42
|
bt.stop
|
43
43
|
sleep 0.2
|
44
|
-
Thread.list.length.
|
44
|
+
expect(Thread.list.length).to eql(1)
|
45
45
|
|
46
46
|
tf.unlink
|
47
47
|
File.delete(File.join(Cosmos::USERPATH,'lib','my_bg_task1.rb'))
|
48
48
|
end
|
49
49
|
|
50
|
-
it "
|
50
|
+
it "handles exceptions" do
|
51
51
|
tf = Tempfile.new('unittest')
|
52
52
|
tf.puts 'BACKGROUND_TASK my_bg_task2.rb'
|
53
53
|
tf.close
|
@@ -63,14 +63,14 @@ module Cosmos
|
|
63
63
|
bt = BackgroundTasks.new(config)
|
64
64
|
bt.start
|
65
65
|
# 2 because the RSpec main thread plus the background task
|
66
|
-
Thread.list.length.
|
66
|
+
expect(Thread.list.length).to eql(2)
|
67
67
|
sleep 1.1 # Allow the thread to crash
|
68
|
-
Thread.list.length.
|
68
|
+
expect(Thread.list.length).to eql(1)
|
69
69
|
bt.stop
|
70
70
|
sleep 0.2
|
71
|
-
Thread.list.length.
|
71
|
+
expect(Thread.list.length).to eql(1)
|
72
72
|
|
73
|
-
stdout.string.
|
73
|
+
expect(stdout.string).to match "Background Task thread unexpectedly died"
|
74
74
|
end
|
75
75
|
tf.unlink
|
76
76
|
File.delete(File.join(Cosmos::USERPATH,'lib','my_bg_task2.rb'))
|
@@ -42,7 +42,7 @@ module Cosmos
|
|
42
42
|
end
|
43
43
|
|
44
44
|
describe "process_file" do
|
45
|
-
it "
|
45
|
+
it "complains if there is an unknown keyword" do
|
46
46
|
tf = Tempfile.new('unittest')
|
47
47
|
tf.puts "UNKNOWN"
|
48
48
|
tf.close
|
@@ -50,7 +50,7 @@ module Cosmos
|
|
50
50
|
tf.unlink
|
51
51
|
end
|
52
52
|
|
53
|
-
it "
|
53
|
+
it "complains if there are not enough parameters" do
|
54
54
|
@keywords.each do |keyword|
|
55
55
|
next if %w(AUTO_INTERFACE_TARGETS).include? keyword
|
56
56
|
tf = Tempfile.new('unittest')
|
@@ -72,7 +72,7 @@ module Cosmos
|
|
72
72
|
end
|
73
73
|
|
74
74
|
context "with TITLE" do
|
75
|
-
it "
|
75
|
+
it "complains about too many parameters" do
|
76
76
|
tf = Tempfile.new('unittest')
|
77
77
|
tf.puts 'TITLE HI THERE'
|
78
78
|
tf.close
|
@@ -80,34 +80,34 @@ module Cosmos
|
|
80
80
|
tf.unlink
|
81
81
|
end
|
82
82
|
|
83
|
-
it "
|
83
|
+
it "sets the title" do
|
84
84
|
tf = Tempfile.new('unittest')
|
85
85
|
tf.puts 'TITLE TEST'
|
86
86
|
tf.close
|
87
87
|
config = CmdTlmServerConfig.new(tf.path)
|
88
|
-
config.title.
|
88
|
+
expect(config.title).to eql "TEST"
|
89
89
|
tf.unlink
|
90
90
|
end
|
91
91
|
end
|
92
92
|
|
93
93
|
context "with PACKET_LOG_WRITER" do
|
94
|
-
it "
|
94
|
+
it "sets the packet log writer" do
|
95
95
|
tf = Tempfile.new('unittest')
|
96
96
|
tf.puts 'PACKET_LOG_WRITER MY_WRITER packet_log_writer.rb'
|
97
97
|
tf.close
|
98
98
|
config =CmdTlmServerConfig.new(tf.path)
|
99
|
-
config.packet_log_writer_pairs.keys.
|
99
|
+
expect(config.packet_log_writer_pairs.keys).to eql ["DEFAULT","MY_WRITER"]
|
100
100
|
tf.unlink
|
101
101
|
end
|
102
102
|
|
103
|
-
it "
|
103
|
+
it "sets the packet log writer with parameters" do
|
104
104
|
tf = Tempfile.new('unittest')
|
105
105
|
tf.puts 'PACKET_LOG_WRITER MY_WRITER packet_log_writer.rb test_log_name false 3 1000 C:\log false'
|
106
106
|
tf.close
|
107
107
|
config = CmdTlmServerConfig.new(tf.path)
|
108
|
-
config.packet_log_writer_pairs.keys.
|
109
|
-
config.packet_log_writer_pairs["DEFAULT"].cmd_log_writer.logging_enabled.
|
110
|
-
config.packet_log_writer_pairs["MY_WRITER"].cmd_log_writer.logging_enabled.
|
108
|
+
expect(config.packet_log_writer_pairs.keys).to eql ["DEFAULT","MY_WRITER"]
|
109
|
+
expect(config.packet_log_writer_pairs["DEFAULT"].cmd_log_writer.logging_enabled).to be_truthy
|
110
|
+
expect(config.packet_log_writer_pairs["MY_WRITER"].cmd_log_writer.logging_enabled).to be_falsey
|
111
111
|
tf.unlink
|
112
112
|
config.packet_log_writer_pairs.each do |name, plwp|
|
113
113
|
plwp.cmd_log_writer.shutdown
|
@@ -118,7 +118,7 @@ module Cosmos
|
|
118
118
|
end
|
119
119
|
|
120
120
|
context "with AUTO_INTERFACE_TARGETS" do
|
121
|
-
it "
|
121
|
+
it "complains about too many parameters" do
|
122
122
|
tf = Tempfile.new('unittest')
|
123
123
|
tf.puts 'AUTO_INTERFACE_TARGETS BLAH'
|
124
124
|
tf.close
|
@@ -126,7 +126,7 @@ module Cosmos
|
|
126
126
|
tf.unlink
|
127
127
|
end
|
128
128
|
|
129
|
-
it "
|
129
|
+
it "automatically processes interfaces" do
|
130
130
|
# Stub out the CmdTlmServer
|
131
131
|
allow(CmdTlmServer).to receive_message_chain(:instance, :subscribe_limits_events)
|
132
132
|
|
@@ -134,13 +134,13 @@ module Cosmos
|
|
134
134
|
tf.puts 'AUTO_INTERFACE_TARGETS'
|
135
135
|
tf.close
|
136
136
|
config = CmdTlmServerConfig.new(tf.path)
|
137
|
-
config.interfaces.keys.
|
137
|
+
expect(config.interfaces.keys).to eql %w(INST_INT COSMOSINT)
|
138
138
|
tf.unlink
|
139
139
|
end
|
140
140
|
end
|
141
141
|
|
142
142
|
context "with INTERFACE_TARGET" do
|
143
|
-
it "
|
143
|
+
it "complains about too many parameters" do
|
144
144
|
tf = Tempfile.new('unittest')
|
145
145
|
tf.puts 'INTERFACE_TARGET BLAH config.txt MORE'
|
146
146
|
tf.close
|
@@ -148,7 +148,7 @@ module Cosmos
|
|
148
148
|
tf.unlink
|
149
149
|
end
|
150
150
|
|
151
|
-
it "
|
151
|
+
it "complains about unknown targets" do
|
152
152
|
tf = Tempfile.new('unittest')
|
153
153
|
tf.puts 'INTERFACE_TARGET BLAH'
|
154
154
|
tf.close
|
@@ -156,7 +156,7 @@ module Cosmos
|
|
156
156
|
tf.unlink
|
157
157
|
end
|
158
158
|
|
159
|
-
it "
|
159
|
+
it "complains about unknown target files" do
|
160
160
|
tf = Tempfile.new('unittest')
|
161
161
|
tf.puts 'INTERFACE_TARGET TEST'
|
162
162
|
tf.close
|
@@ -165,18 +165,18 @@ module Cosmos
|
|
165
165
|
tf.unlink
|
166
166
|
end
|
167
167
|
|
168
|
-
it "
|
168
|
+
it "processes an interface" do
|
169
169
|
tf = Tempfile.new('unittest')
|
170
170
|
tf.puts 'INTERFACE_TARGET INST'
|
171
171
|
tf.close
|
172
172
|
config = CmdTlmServerConfig.new(tf.path)
|
173
|
-
config.interfaces.keys.
|
173
|
+
expect(config.interfaces.keys).to eql %w(INST_INT)
|
174
174
|
tf.unlink
|
175
175
|
end
|
176
176
|
end
|
177
177
|
|
178
178
|
context "with DONT_CONNECT" do
|
179
|
-
it "
|
179
|
+
it "complains about too many parameters" do
|
180
180
|
tf = Tempfile.new('unittest')
|
181
181
|
tf.puts "INTERFACE CtsConfigTestInterface cts_config_test_interface.rb"
|
182
182
|
tf.puts 'DONT_CONNECT TRUE'
|
@@ -185,19 +185,19 @@ module Cosmos
|
|
185
185
|
tf.unlink
|
186
186
|
end
|
187
187
|
|
188
|
-
it "
|
188
|
+
it "sets the interface to not connect on startup" do
|
189
189
|
tf = Tempfile.new('unittest')
|
190
190
|
tf.puts "INTERFACE CtsConfigTestInterface cts_config_test_interface.rb"
|
191
191
|
tf.puts 'DONT_CONNECT'
|
192
192
|
tf.close
|
193
193
|
config = CmdTlmServerConfig.new(tf.path)
|
194
|
-
config.interfaces['CTSCONFIGTESTINTERFACE'].connect_on_startup.
|
194
|
+
expect(config.interfaces['CTSCONFIGTESTINTERFACE'].connect_on_startup).to be_falsey
|
195
195
|
tf.unlink
|
196
196
|
end
|
197
197
|
end
|
198
198
|
|
199
199
|
context "with DONT_RECONNECT" do
|
200
|
-
it "
|
200
|
+
it "complains about too many parameters" do
|
201
201
|
tf = Tempfile.new('unittest')
|
202
202
|
tf.puts "INTERFACE CtsConfigTestInterface cts_config_test_interface.rb"
|
203
203
|
tf.puts 'DONT_RECONNECT TRUE'
|
@@ -206,19 +206,19 @@ module Cosmos
|
|
206
206
|
tf.unlink
|
207
207
|
end
|
208
208
|
|
209
|
-
it "
|
209
|
+
it "sets the interface to not auto reconnect" do
|
210
210
|
tf = Tempfile.new('unittest')
|
211
211
|
tf.puts "INTERFACE CtsConfigTestInterface cts_config_test_interface.rb"
|
212
212
|
tf.puts 'DONT_RECONNECT'
|
213
213
|
tf.close
|
214
214
|
config = CmdTlmServerConfig.new(tf.path)
|
215
|
-
config.interfaces['CTSCONFIGTESTINTERFACE'].auto_reconnect.
|
215
|
+
expect(config.interfaces['CTSCONFIGTESTINTERFACE'].auto_reconnect).to be_falsey
|
216
216
|
tf.unlink
|
217
217
|
end
|
218
218
|
end
|
219
219
|
|
220
220
|
context "with RECONNECT_DELAY" do
|
221
|
-
it "
|
221
|
+
it "complains about too many parameters" do
|
222
222
|
tf = Tempfile.new('unittest')
|
223
223
|
tf.puts "INTERFACE CtsConfigTestInterface cts_config_test_interface.rb"
|
224
224
|
tf.puts 'RECONNECT_DELAY 5.0 TRUE'
|
@@ -227,19 +227,19 @@ module Cosmos
|
|
227
227
|
tf.unlink
|
228
228
|
end
|
229
229
|
|
230
|
-
it "
|
230
|
+
it "sets the delay between reconnect tries" do
|
231
231
|
tf = Tempfile.new('unittest')
|
232
232
|
tf.puts "INTERFACE CtsConfigTestInterface cts_config_test_interface.rb"
|
233
233
|
tf.puts 'RECONNECT_DELAY 5.0'
|
234
234
|
tf.close
|
235
235
|
config = CmdTlmServerConfig.new(tf.path)
|
236
|
-
config.interfaces['CTSCONFIGTESTINTERFACE'].reconnect_delay.
|
236
|
+
expect(config.interfaces['CTSCONFIGTESTINTERFACE'].reconnect_delay).to eql 5.0
|
237
237
|
tf.unlink
|
238
238
|
end
|
239
239
|
end
|
240
240
|
|
241
241
|
context "with DISABLE_DISCONNECT" do
|
242
|
-
it "
|
242
|
+
it "complains about too many parameters" do
|
243
243
|
tf = Tempfile.new('unittest')
|
244
244
|
tf.puts "INTERFACE CtsConfigTestInterface cts_config_test_interface.rb"
|
245
245
|
tf.puts 'DISABLE_DISCONNECT TRUE'
|
@@ -248,19 +248,19 @@ module Cosmos
|
|
248
248
|
tf.unlink
|
249
249
|
end
|
250
250
|
|
251
|
-
it "
|
251
|
+
it "sets the interface to not allow disconnects" do
|
252
252
|
tf = Tempfile.new('unittest')
|
253
253
|
tf.puts "INTERFACE CtsConfigTestInterface cts_config_test_interface.rb"
|
254
254
|
tf.puts 'DISABLE_DISCONNECT'
|
255
255
|
tf.close
|
256
256
|
config = CmdTlmServerConfig.new(tf.path)
|
257
|
-
config.interfaces['CTSCONFIGTESTINTERFACE'].disable_disconnect.
|
257
|
+
expect(config.interfaces['CTSCONFIGTESTINTERFACE'].disable_disconnect).to be_truthy
|
258
258
|
tf.unlink
|
259
259
|
end
|
260
260
|
end
|
261
261
|
|
262
262
|
context "with OPTION" do
|
263
|
-
it "
|
263
|
+
it "complains about too few parameters" do
|
264
264
|
tf = Tempfile.new('unittest')
|
265
265
|
tf.puts "INTERFACE CtsConfigTestInterface cts_config_test_interface.rb"
|
266
266
|
tf.puts 'OPTION TRUE'
|
@@ -269,19 +269,19 @@ module Cosmos
|
|
269
269
|
tf.unlink
|
270
270
|
end
|
271
271
|
|
272
|
-
it "
|
272
|
+
it "sets the interface to listen on a specific address" do
|
273
273
|
tf = Tempfile.new('unittest')
|
274
274
|
tf.puts "INTERFACE CtsConfigTestInterface cts_config_test_interface.rb"
|
275
275
|
tf.puts 'OPTION LISTEN_ADDRESS 127.0.0.1'
|
276
276
|
tf.close
|
277
277
|
config = CmdTlmServerConfig.new(tf.path)
|
278
|
-
config.interfaces['CTSCONFIGTESTINTERFACE'].options['LISTEN_ADDRESS'].
|
278
|
+
expect(config.interfaces['CTSCONFIGTESTINTERFACE'].options['LISTEN_ADDRESS']).to eql(['127.0.0.1'])
|
279
279
|
tf.unlink
|
280
280
|
end
|
281
281
|
end
|
282
282
|
|
283
283
|
context "with LOG" do
|
284
|
-
it "
|
284
|
+
it "complains about too many parameters" do
|
285
285
|
tf = Tempfile.new('unittest')
|
286
286
|
tf.puts "INTERFACE CtsConfigTestInterface cts_config_test_interface.rb"
|
287
287
|
tf.puts 'LOG PacketLogWriter TRUE'
|
@@ -290,7 +290,7 @@ module Cosmos
|
|
290
290
|
tf.unlink
|
291
291
|
end
|
292
292
|
|
293
|
-
it "
|
293
|
+
it "complains about unknown log writers" do
|
294
294
|
tf = Tempfile.new('unittest')
|
295
295
|
tf.puts "INTERFACE CtsConfigTestInterface cts_config_test_interface.rb"
|
296
296
|
tf.puts 'LOG MyLogWriter'
|
@@ -299,13 +299,13 @@ module Cosmos
|
|
299
299
|
tf.unlink
|
300
300
|
end
|
301
301
|
|
302
|
-
it "
|
302
|
+
it "adds a packet log writer to the interface" do
|
303
303
|
tf = Tempfile.new('unittest')
|
304
304
|
tf.puts "INTERFACE CtsConfigTestInterface cts_config_test_interface.rb"
|
305
305
|
tf.puts 'LOG DEFAULT'
|
306
306
|
tf.close
|
307
307
|
config = CmdTlmServerConfig.new(tf.path)
|
308
|
-
config.interfaces['CTSCONFIGTESTINTERFACE'].packet_log_writer_pairs.length.
|
308
|
+
expect(config.interfaces['CTSCONFIGTESTINTERFACE'].packet_log_writer_pairs.length).to eql 1
|
309
309
|
tf.unlink
|
310
310
|
|
311
311
|
tf = Tempfile.new('unittest')
|
@@ -315,13 +315,13 @@ module Cosmos
|
|
315
315
|
tf.puts 'LOG MY_WRITER'
|
316
316
|
tf.close
|
317
317
|
config = CmdTlmServerConfig.new(tf.path)
|
318
|
-
config.interfaces['CTSCONFIGTESTINTERFACE'].packet_log_writer_pairs.length.
|
318
|
+
expect(config.interfaces['CTSCONFIGTESTINTERFACE'].packet_log_writer_pairs.length).to eql 2
|
319
319
|
tf.unlink
|
320
320
|
end
|
321
321
|
end
|
322
322
|
|
323
323
|
context "with DONT_LOG" do
|
324
|
-
it "
|
324
|
+
it "complains about too many parameters" do
|
325
325
|
tf = Tempfile.new('unittest')
|
326
326
|
tf.puts "INTERFACE CtsConfigTestInterface cts_config_test_interface.rb"
|
327
327
|
tf.puts 'DONT_LOG TRUE'
|
@@ -330,19 +330,19 @@ module Cosmos
|
|
330
330
|
tf.unlink
|
331
331
|
end
|
332
332
|
|
333
|
-
it "
|
333
|
+
it "removes loggers from the interface" do
|
334
334
|
tf = Tempfile.new('unittest')
|
335
335
|
tf.puts "INTERFACE CtsConfigTestInterface cts_config_test_interface.rb"
|
336
336
|
tf.puts 'DONT_LOG'
|
337
337
|
tf.close
|
338
338
|
config = CmdTlmServerConfig.new(tf.path)
|
339
|
-
config.interfaces['CTSCONFIGTESTINTERFACE'].packet_log_writer_pairs.length.
|
339
|
+
expect(config.interfaces['CTSCONFIGTESTINTERFACE'].packet_log_writer_pairs.length).to eql 0
|
340
340
|
tf.unlink
|
341
341
|
end
|
342
342
|
end
|
343
343
|
|
344
344
|
context "with TARGET" do
|
345
|
-
it "
|
345
|
+
it "complains about too many parameters" do
|
346
346
|
tf = Tempfile.new('unittest')
|
347
347
|
tf.puts "INTERFACE CtsConfigTestInterface cts_config_test_interface.rb"
|
348
348
|
tf.puts 'TARGET TEST TRUE'
|
@@ -351,7 +351,7 @@ module Cosmos
|
|
351
351
|
tf.unlink
|
352
352
|
end
|
353
353
|
|
354
|
-
it "
|
354
|
+
it "complains about unknown targets" do
|
355
355
|
tf = Tempfile.new('unittest')
|
356
356
|
tf.puts "INTERFACE CtsConfigTestInterface cts_config_test_interface.rb"
|
357
357
|
tf.puts 'TARGET BLAH'
|
@@ -362,7 +362,7 @@ module Cosmos
|
|
362
362
|
end
|
363
363
|
|
364
364
|
context "with two interfaces with the same name" do
|
365
|
-
it "
|
365
|
+
it "complains about duplicate interface names" do
|
366
366
|
tf = Tempfile.new('unittest')
|
367
367
|
tf.puts "INTERFACE CtsConfigTestInterface cts_config_test_interface.rb"
|
368
368
|
tf.puts "INTERFACE CtsConfigTestInterface cts_config_test_interface.rb"
|
@@ -373,7 +373,7 @@ module Cosmos
|
|
373
373
|
end
|
374
374
|
|
375
375
|
context "with two routers with the same name" do
|
376
|
-
it "
|
376
|
+
it "complains about duplicate router names" do
|
377
377
|
tf = Tempfile.new('unittest')
|
378
378
|
tf.puts "ROUTER MY_ROUTER1 cts_config_test_interface.rb"
|
379
379
|
tf.puts "ROUTER MY_ROUTER1 cts_config_test_interface.rb"
|
@@ -384,19 +384,19 @@ module Cosmos
|
|
384
384
|
end
|
385
385
|
|
386
386
|
context "with ROUTER" do
|
387
|
-
it "
|
387
|
+
it "creates a new router" do
|
388
388
|
tf = Tempfile.new('unittest')
|
389
389
|
tf.puts 'ROUTER MY_ROUTER1 cts_config_test_interface.rb'
|
390
390
|
tf.puts 'ROUTER MY_ROUTER2 cts_config_test_interface.rb false'
|
391
391
|
tf.close
|
392
392
|
config = CmdTlmServerConfig.new(tf.path)
|
393
|
-
config.routers.keys.
|
393
|
+
expect(config.routers.keys).to eql %w(MY_ROUTER1 MY_ROUTER2)
|
394
394
|
tf.unlink
|
395
395
|
end
|
396
396
|
end
|
397
397
|
|
398
398
|
context "with ROUTE" do
|
399
|
-
it "
|
399
|
+
it "complains about too many parameters" do
|
400
400
|
tf = Tempfile.new('unittest')
|
401
401
|
tf.puts 'ROUTER ROUTER cts_config_test_interface.rb'
|
402
402
|
tf.puts 'ROUTE interface more'
|
@@ -405,7 +405,7 @@ module Cosmos
|
|
405
405
|
tf.unlink
|
406
406
|
end
|
407
407
|
|
408
|
-
it "
|
408
|
+
it "complains if a router hasn't been defined" do
|
409
409
|
tf = Tempfile.new('unittest')
|
410
410
|
tf.puts 'ROUTE interface more'
|
411
411
|
tf.close
|
@@ -413,7 +413,7 @@ module Cosmos
|
|
413
413
|
tf.unlink
|
414
414
|
end
|
415
415
|
|
416
|
-
it "
|
416
|
+
it "complains if the interface is undefined" do
|
417
417
|
tf = Tempfile.new('unittest')
|
418
418
|
tf.puts 'ROUTER ROUTER cts_config_test_interface.rb'
|
419
419
|
tf.puts 'ROUTE CTSCONFIGTESTINTERFACE'
|
@@ -422,28 +422,28 @@ module Cosmos
|
|
422
422
|
tf.unlink
|
423
423
|
end
|
424
424
|
|
425
|
-
it "
|
425
|
+
it "creates the route" do
|
426
426
|
tf = Tempfile.new('unittest')
|
427
427
|
tf.puts "INTERFACE CtsConfigTestInterface cts_config_test_interface.rb"
|
428
428
|
tf.puts 'ROUTER ROUTER cts_config_test_interface.rb'
|
429
429
|
tf.puts 'ROUTE CTSCONFIGTESTINTERFACE'
|
430
430
|
tf.close
|
431
431
|
config = CmdTlmServerConfig.new(tf.path)
|
432
|
-
config.routers['ROUTER'].interfaces[0].
|
432
|
+
expect(config.routers['ROUTER'].interfaces[0]).to be_a CtsConfigTestInterface
|
433
433
|
tf.unlink
|
434
434
|
end
|
435
435
|
end
|
436
436
|
|
437
437
|
context "with BACKGROUND_TASK" do
|
438
|
-
it "
|
438
|
+
it "creates a background task" do
|
439
439
|
tf = Tempfile.new('unittest')
|
440
440
|
tf.puts 'BACKGROUND_TASK cts_config_test_interface.rb'
|
441
441
|
tf.puts 'BACKGROUND_TASK cts_config_test_interface.rb false'
|
442
442
|
tf.close
|
443
443
|
config = CmdTlmServerConfig.new(tf.path)
|
444
|
-
config.background_tasks.length.
|
445
|
-
config.background_tasks[0].
|
446
|
-
config.background_tasks[1].
|
444
|
+
expect(config.background_tasks.length).to eql 2
|
445
|
+
expect(config.background_tasks[0]).to be_a CtsConfigTestInterface
|
446
|
+
expect(config.background_tasks[1]).to be_a CtsConfigTestInterface
|
447
447
|
tf.unlink
|
448
448
|
end
|
449
449
|
end
|