-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test (machine) : add an interface for vsock interaction
Signed-off-by: Rohan Kumar <[email protected]>
- Loading branch information
1 parent
63c5eb3
commit 0e36ad5
Showing
7 changed files
with
48 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package fakemachine | ||
|
||
import crcPreset "github.com/crc-org/crc/v2/pkg/crc/preset" | ||
|
||
type FakeVSock struct { | ||
PortsExposed bool | ||
} | ||
|
||
func (v *FakeVSock) ExposePorts(preset crcPreset.Preset, ingressHTTPPort, ingressHTTPSPort uint) error { | ||
Check failure on line 9 in pkg/crc/machine/fakemachine/vsock.go GitHub Actions / build (windows-2022, 1.22)
Check failure on line 9 in pkg/crc/machine/fakemachine/vsock.go GitHub Actions / build (macOS-13, 1.22)
Check failure on line 9 in pkg/crc/machine/fakemachine/vsock.go GitHub Actions / build (macOS-12, 1.22)
Check failure on line 9 in pkg/crc/machine/fakemachine/vsock.go GitHub Actions / build (ubuntu-latest, 1.22)
|
||
v.PortsExposed = true | ||
return nil | ||
} | ||
|
||
func (v *FakeVSock) UnExposePorts() error { | ||
v.PortsExposed = false | ||
return nil | ||
} | ||
|
||
func NewFakeVSock() *FakeVSock { | ||
return &FakeVSock{ | ||
PortsExposed: false, | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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