Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests(agent,ssh): add integration tests to SSH connection #3517

Merged
merged 11 commits into from
Apr 12, 2024

Conversation

henrybarreto
Copy link
Member

@henrybarreto henrybarreto commented Feb 5, 2024

In this PR, we are adding the initial integration testes between Agent and ShellHub instance.

  • Connect to the server.
  • Connect to server with custom identity
  • Reconnect to it after losing its connection.
  • Authentication
    • Password.
      • With custom identity
    • Public key.
  • SSH connections
    • Pipeing shell and exec request on same connection
    • Interactive shell.
      • Connection
      • With Pty
      • Without Pty
    • Command execution.
      • Exit status.
      • Stdin, Stdout, Stderror
        • With custom identity
    • SFTP.
      • Lagacy mode (SCP).
        • From Agent to client.
          Error when download the file; seems to be some package internal.
        • From client to Agent.
      • From Agent to client.
      • From client to Agent.

Running it

To run tests, I use this command:

go test -v --failfast -shuffle on -timeout 1h ./tests -run "TestAgent"

Timeout is set to avoid the default one that is 600 second, --failfast to help to spare time and -shuffle to guarantee false positive due to a before test, and -parallel to define how many tests can run in the same time.

@henrybarreto henrybarreto changed the title wip tests(agent): add integration tests to agent Feb 5, 2024
@henrybarreto henrybarreto changed the title tests(agent): add integration tests to agent tests(agent): add integration tests Feb 5, 2024
@henrybarreto henrybarreto changed the title tests(agent): add integration tests test(agent): add integration tests Feb 5, 2024
@henrybarreto henrybarreto changed the title test(agent): add integration tests testsagent): add integration tests Feb 5, 2024
@henrybarreto henrybarreto changed the title testsagent): add integration tests tests(agent): add integration tests Feb 5, 2024
@henrybarreto henrybarreto self-assigned this Feb 5, 2024
@henrybarreto henrybarreto changed the base branch from topic/integration-tests to fix/agent_dockefile_production February 6, 2024 14:56
@henrybarreto henrybarreto force-pushed the topic/integration-tests-agent branch 4 times, most recently from e349278 to 265e1da Compare February 7, 2024 13:21
@henrybarreto henrybarreto changed the base branch from fix/agent_dockefile_production to master February 7, 2024 13:22
tests/agent_test.go Outdated Show resolved Hide resolved
@henrybarreto henrybarreto force-pushed the topic/integration-tests-agent branch 5 times, most recently from a6c850f to b61fb38 Compare February 26, 2024 21:07
@henrybarreto henrybarreto changed the base branch from master to topic/integration-tests February 26, 2024 21:09
@henrybarreto henrybarreto changed the base branch from topic/integration-tests to master February 26, 2024 21:09
@henrybarreto henrybarreto force-pushed the topic/integration-tests-agent branch 8 times, most recently from b14f29e to 9498455 Compare February 27, 2024 21:25
@henrybarreto henrybarreto force-pushed the topic/integration-tests-agent branch 12 times, most recently from 5224a17 to 897a440 Compare April 4, 2024 18:08
@henrybarreto henrybarreto force-pushed the topic/integration-tests-agent branch 2 times, most recently from bfe5a47 to 27677d4 Compare April 12, 2024 00:20
@gustavosbarreto gustavosbarreto merged commit 9b729c8 into master Apr 12, 2024
24 checks passed
@gustavosbarreto gustavosbarreto deleted the topic/integration-tests-agent branch April 12, 2024 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants