Blame internal/osbuild2/selinux_stage_test.go
|
Packit Service |
15f37d |
package osbuild2
|
|
Packit Service |
15f37d |
|
|
Packit Service |
15f37d |
import (
|
|
Packit Service |
15f37d |
"testing"
|
|
Packit Service |
15f37d |
|
|
Packit Service |
15f37d |
"github.com/stretchr/testify/assert"
|
|
Packit Service |
15f37d |
)
|
|
Packit Service |
15f37d |
|
|
Packit Service |
15f37d |
func TestNewSELinuxStageOptions(t *testing.T) {
|
|
Packit Service |
15f37d |
expectedOptions := &SELinuxStageOptions{
|
|
Packit Service |
15f37d |
FileContexts: "etc/selinux/targeted/contexts/files/file_contexts",
|
|
Packit Service |
15f37d |
}
|
|
Packit Service |
15f37d |
actualOptions := NewSELinuxStageOptions("etc/selinux/targeted/contexts/files/file_contexts")
|
|
Packit Service |
15f37d |
assert.Equal(t, expectedOptions, actualOptions)
|
|
Packit Service |
15f37d |
}
|
|
Packit Service |
15f37d |
|
|
Packit Service |
15f37d |
func TestNewSELinuxStage(t *testing.T) {
|
|
Packit Service |
15f37d |
expectedStage := &Stage{
|
|
Packit Service |
15f37d |
Type: "org.osbuild.selinux",
|
|
Packit Service |
15f37d |
Options: &SELinuxStageOptions{},
|
|
Packit Service |
15f37d |
}
|
|
Packit Service |
15f37d |
actualStage := NewSELinuxStage(&SELinuxStageOptions{})
|
|
Packit Service |
15f37d |
assert.Equal(t, expectedStage, actualStage)
|
|
Packit Service |
15f37d |
}
|