github.com/inspektor-gadget/inspektor-gadget@v0.28.1/pkg/container-utils/testutils/options_test.go (about)

     1  package testutils
     2  
     3  import (
     4  	"testing"
     5  )
     6  
     7  func TestContainerOptions(t *testing.T) {
     8  	opts := defaultContainerOptions()
     9  
    10  	if opts.image != DefaultContainerImage {
    11  		t.Errorf("Expected default container image to be %q", DefaultContainerImage)
    12  	}
    13  	if opts.imageTag != DefaultContainerImageTag {
    14  		t.Errorf("Expected default container image tag to be %q", DefaultContainerImageTag)
    15  	}
    16  	if opts.seccompProfile != "" {
    17  		t.Errorf("Expected default seccompProfile to be empty")
    18  	}
    19  
    20  	if !opts.logs {
    21  		t.Errorf("Expected default logs to be true")
    22  	}
    23  	if !opts.wait {
    24  		t.Errorf("Expected default wait to be true")
    25  	}
    26  	if !opts.removal {
    27  		t.Errorf("Expected default removal to be true")
    28  	}
    29  }