-
Notifications
You must be signed in to change notification settings - Fork 242
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 988b812
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(_ crcPreset.Preset, _, _ uint) error { | ||
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