Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cilium/tetragon
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8548b39008c1cdcfb4de28e85d3c73a5fd816ccd
Choose a base ref
..
head repository: cilium/tetragon
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ecaa8d0ca784e62c525a43ec7b920494ebeb0abd
Choose a head ref
Showing with 15 additions and 0 deletions.
  1. +15 −0 cmd/tetragon-vmtests-run/image.go
15 changes: 15 additions & 0 deletions cmd/tetragon-vmtests-run/image.go
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ import (
"strings"

"github.com/cilium/little-vm-helper/pkg/images"
"github.com/cilium/little-vm-helper/pkg/step"
"github.com/cilium/tetragon/pkg/vmtests"
"github.com/sirupsen/logrus"
)
@@ -199,6 +200,19 @@ func buildNetActions(tmpDir string) ([]images.Action, error) {
return ret, nil
}

type NoNetworkCommand struct{}

func (rc *NoNetworkCommand) ActionOpName() string {
return "no-network"
}

func (rc *NoNetworkCommand) ToSteps(s *images.StepConf) ([]step.Step, error) {
return []step.Step{&images.VirtCustomizeStep{
StepConf: s,
Args: []string{"--no-network"},
}}, nil
}

func buildTestImage(log *logrus.Logger, rcnf *RunConf) error {

imagesDir, baseImage := filepath.Split(rcnf.baseFname)
@@ -226,6 +240,7 @@ func buildTestImage(log *logrus.Logger, rcnf *RunConf) error {
}

actions := []images.Action{
{Op: &NoNetworkCommand{}},
{Op: &images.SetHostnameCommand{Hostname: hostname}},
{Op: &images.AppendLineCommand{
File: "/etc/sysctl.d/local.conf",