summaryrefslogtreecommitdiff
path: root/pkg/machine/e2e/ssh_test.go
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-07-21 11:36:32 +0200
committerMatthew Heon <matthew.heon@pm.me>2022-07-26 14:24:30 -0400
commitce790e61b1a0a983a1900b76b1ad9864d15b1496 (patch)
tree4c07afe3d699e73ce77ed171342ff58869a24bc4 /pkg/machine/e2e/ssh_test.go
parentff7259567663ee5d6cf9b3e8e62c5d4ac39c47d6 (diff)
downloadpodman-ce790e61b1a0a983a1900b76b1ad9864d15b1496.tar.gz
podman-ce790e61b1a0a983a1900b76b1ad9864d15b1496.tar.bz2
podman-ce790e61b1a0a983a1900b76b1ad9864d15b1496.zip
enable linter for pkg/machine/e2e
Rename all files to _test.go and rename the package to e2e_test. This makes the linter less strict about things like dot imports. Add some unused nolint directives to silence some warnings, these can be used to find untested options so someone could add tests for them. Fixes #14996 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'pkg/machine/e2e/ssh_test.go')
-rw-r--r--pkg/machine/e2e/ssh_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg/machine/e2e/ssh_test.go b/pkg/machine/e2e/ssh_test.go
index 9ee31ac26..6d23a024e 100644
--- a/pkg/machine/e2e/ssh_test.go
+++ b/pkg/machine/e2e/ssh_test.go
@@ -1,4 +1,4 @@
-package e2e
+package e2e_test
import (
. "github.com/onsi/ginkgo"
@@ -20,17 +20,17 @@ var _ = Describe("podman machine ssh", func() {
})
It("bad machine name", func() {
- name := randomString(12)
+ name := randomString()
ssh := sshMachine{}
session, err := mb.setName(name).setCmd(ssh).run()
Expect(err).To(BeNil())
Expect(session).To(Exit(125))
// TODO seems like stderr is not being returned; re-enabled when fixed
- //Expect(session.outputToString()).To(ContainSubstring("not exist"))
+ // Expect(session.outputToString()).To(ContainSubstring("not exist"))
})
It("ssh to non-running machine", func() {
- name := randomString(12)
+ name := randomString()
i := new(initMachine)
session, err := mb.setName(name).setCmd(i.withImagePath(mb.imagePath)).run()
Expect(err).To(BeNil())
@@ -40,12 +40,12 @@ var _ = Describe("podman machine ssh", func() {
sshSession, err := mb.setName(name).setCmd(ssh).run()
Expect(err).To(BeNil())
// TODO seems like stderr is not being returned; re-enabled when fixed
- //Expect(sshSession.outputToString()).To(ContainSubstring("is not running"))
+ // Expect(sshSession.outputToString()).To(ContainSubstring("is not running"))
Expect(sshSession).To(Exit(125))
})
It("ssh to running machine and check os-type", func() {
- name := randomString(12)
+ name := randomString()
i := new(initMachine)
session, err := mb.setName(name).setCmd(i.withImagePath(mb.imagePath).withNow()).run()
Expect(err).To(BeNil())