6
6
"testing"
7
7
"time"
8
8
9
- "github.com/defenseunicorns/zarf/src/internal/k8s"
10
9
"github.com/defenseunicorns/zarf/src/internal/utils"
11
10
"github.com/stretchr/testify/assert"
12
11
"github.com/stretchr/testify/require"
@@ -27,15 +26,11 @@ func TestDataInjection(t *testing.T) {
27
26
stdOut , stdErr , err := utils .ExecCommandWithContext (ctx , true , e2e .zarfBinPath , "package" , "deploy" , path , "--confirm" )
28
27
require .NoError (t , err , stdOut , stdErr )
29
28
30
- // Get the data injection pod
31
- pods , err := k8s .GetPods ("demo" )
32
- require .NoError (t , err )
33
- require .Equal (t , len (pods .Items ), 1 )
34
- pod := pods .Items [0 ]
35
-
36
- stdOut , stdErr , err = utils .ExecCommandWithContext (context .TODO (), true , "kubectl" , "-n" , pod .Namespace , "exec" , pod .Name , "--" , "ls" , "/test" )
29
+ // verify the file and injection marker were created
30
+ stdOut , stdErr , err = utils .ExecCommandWithContext (context .TODO (), true , "kubectl" , "--namespace=demo" , "logs" , "--tail=5" , "--selector=app=data-injection" )
37
31
require .NoError (t , err , stdOut , stdErr )
38
32
assert .Contains (t , stdOut , "this-is-an-example-file.txt" )
33
+ assert .Contains (t , stdOut , ".zarf-injection-" )
39
34
40
35
e2e .chartsToRemove = append (e2e .chartsToRemove , ChartTarget {
41
36
namespace : "demo" ,
0 commit comments