Skip to content

Commit

Permalink
Merge pull request #355 from pivotal-cf/feat/world-class-dev-experien…
Browse files Browse the repository at this point in the history
…ce--use-hello-tile

test(commands/test_tile): use hello tile instead of tas for unit tests
  • Loading branch information
notrepo05 authored Mar 8, 2023
2 parents 0b8ed80 + c65484e commit 80dc459
Show file tree
Hide file tree
Showing 7 changed files with 234 additions and 429 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ env.yml
*.key
*.pem
.vscode

vendor
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "internal/acceptance/workflows/hello-tile"]
path = internal/acceptance/workflows/hello-tile
url = [email protected]:crhntr/hello-tile
[submodule "internal/commands/testdata/test_tile/hello-tile"]
path = internal/commands/testdata/test_tile/hello-tile
url = [email protected]:crhntr/hello-tile.git
44 changes: 44 additions & 0 deletions internal/commands/fakes/conn.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package fakes

import (
"io"
"net"
"time"
)

type Conn struct {
R io.Reader
W io.Writer
}

func (c *Conn) LocalAddr() net.Addr {
return nil
}

func (c *Conn) RemoteAddr() net.Addr {
return &net.UnixAddr{Name: "test", Net: "test"}
}

func (c *Conn) SetDeadline(t time.Time) error {
return nil
}

func (c *Conn) SetReadDeadline(t time.Time) error {
return nil
}

func (c *Conn) SetWriteDeadline(t time.Time) error {
return nil
}

func (c *Conn) Read(p []byte) (int, error) {
return c.R.Read(p)
}

func (c *Conn) Write(p []byte) (int, error) {
return c.W.Write(p)
}

func (c *Conn) Close() error {
return nil
}
2 changes: 1 addition & 1 deletion internal/commands/test_tile.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (u ManifestTest) Execute(args []string) error {
}

session, _ := mobySession.NewSession(u.ctx, "waypoint", "")
defer session.Close()
defer closeAndIgnoreError(session)
session.Allow(sshp)
dialSession := func(ctx context.Context, proto string, meta map[string][]string) (net.Conn, error) {
return u.mobi.DialHijack(ctx, "/session", proto, meta)
Expand Down
238 changes: 0 additions & 238 deletions internal/commands/test_tile_reference.go.txt

This file was deleted.

Loading

0 comments on commit 80dc459

Please sign in to comment.