Draft
Conversation
Pull Request Test Coverage Report for Build 2798317358
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey @carlmontanari
I know you sup busy, so whenver you're there I'd appreaciate your expert opinion on a strange thing I see in scrapligo (v1.2.2) test.
Namely in this PR you see a newly added test function added called
TestResetCfgwhich acts on an file input with send/recv chars.The issue I am seeing is that scrapligo doesn't emit an error when the written bytes don't match the received ones.
Here is a snippet from the test execution with verbose logging:
go test -timeout 30s -v -run ^TestResetCfg$ github.com/openconfig/kne/topo/node/srlThe bad stuff happens on line 3, where we write
load factory auto-commit, but we read back some other line and no error is sent back.Full log below
Details
``` Running tool: /root/sdk/go1.18.4/bin/go test -timeout 30s -run ^TestResetCfg$ github.com/openconfig/kne/topo/node/srl=== RUN TestResetCfg
=== RUN TestResetCfg/success
time="2022-08-04T16:38:52+02:00" level=info msg="pod1 resetting config"
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG opening connection to host 'pod1' on port '22'
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG starting channel read loop
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG auth bypass is enabled, skipping in channel auth check
/root/openconfig/kne/topo/node/srl/logging.go:54: INFO connection opened successfully
/root/openconfig/kne/topo/node/srl/logging.go:54: INFO AcquirePriv requested, target privilege level 'exec'
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel GetPrompt requested
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel write "\n"
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel read "Using configuration file(s): []\nWelcome to the srlinux CLI.\nType 'help' (and press ) if you need any help using this.\nWarning: Running in basic cli engine, only limited set of features is enabled.\n--{ running }--[ ]--\nA:pod1#"
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG AcquirePriv determined no privilege action necessary
/root/openconfig/kne/topo/node/srl/logging.go:54: INFO SendCommand requested, sending 'environment cli-engine type basic'
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel SendInput requested, sending input 'environment cli-engine type basic'
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel write "environment cli-engine type basic"
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel read " environment cli-engine type basic"
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel write "\n"
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel read "\n--{ running }--[ ]--\nA:pod1#"
/root/openconfig/kne/topo/node/srl/logging.go:54: INFO SendCommand requested, sending 'environment complete-on-space false'
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel SendInput requested, sending input 'environment complete-on-space false'
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel write "environment complete-on-space false"
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel read " environment complete-on-space false"
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel write "\n"
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel read "\n--{ + running }--[ ]--\nA:pod1#"
/root/openconfig/kne/topo/node/srl/logging.go:54: INFO SendCommand requested, sending 'info from state system app-management application mgmt_server state | grep running'
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel SendInput requested, sending input 'info from state system app-management application mgmt_server state | grep running'
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel write "info from state system app-management application mgmt_server state | grep running"
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel read " info from state system app-management application mgmt_server state | grep running"
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel write "\n"
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel read "\n state running\n--{ running }--[ ]--\nA:pod1#"
/root/openconfig/kne/topo/node/srl/logging.go:54: INFO SendCommand requested, sending 'info from state system configuration commit 1 status | grep complete'
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel SendInput requested, sending input 'info from state system configuration commit 1 status | grep complete'
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel write "info from state system configuration commit 1 status | grep complete"
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel read " info from state system configuration commit 1 status | grep complete"
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel write "\n"
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel read "\n status complete\n--{ running }--[ ]--\nA:pod1#"
/root/openconfig/kne/topo/node/srl/logging.go:54: INFO SendCommand requested, sending 'load factory auto-commit'
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel SendInput requested, sending input 'load factory auto-commit'
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel write "load factory auto-commit"
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel read " enter candidate private\n--{ candidate private private-admin }--[ ]--\nA:pod1# load factory auto-commit"
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel write "\n"
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel read " \n/system/configuration/checkpoint[id=factory]:\n Reverting to factory configuration\n\n/:\n Preamble must be present in configuration file\n\n/:\n Successfully reverted configuration\n\n--{ + candidate private private-admin }--[ ]--\nA:pod1#"
time="2022-08-04T16:38:52+02:00" level=info msg="pod1 - finished resetting config"
/root/openconfig/kne/topo/node/srl/logging.go:54: INFO AcquirePriv requested, target privilege level 'exec'
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel GetPrompt requested
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel write "\n"
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel read "\n--{ + candidate private private-admin }--[ ]--\nA:pod1#"
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG AcquirePriv determined privilege de-escalation necessary
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel SendInput requested, sending input 'discard now'
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG channel write "discard now"
/root/openconfig/kne/topo/node/srl/logging.go:54: CRITICAL channel timeout sending input to device
/root/openconfig/kne/topo/node/srl/logging.go:54: CRITICAL error running network on close, error: errTimeoutError: channel timeout sending input to device
/root/openconfig/kne/topo/node/srl/logging.go:54: DEBUG closing connection to host 'pod1' on port '22'
/root/openconfig/kne/topo/node/srl/logging.go:54: INFO connection closed successfully
--- PASS: TestResetCfg (2.01s)
--- PASS: TestResetCfg/success (2.01s)
PASS
ok github.com/openconfig/kne/topo/node/srl 2.029s