// TestEntrypointRunningStepsInOrder is an integration test that will
// verify attempt to the get the entrypoint of a container image
// that doesn't have a cmd defined. In addition to making sure the steps
// are executed in the order specified
TestEntrypointRunningStepsInOrder is an integration test that will
verify attempt to the get the entrypoint of a container image
that doesn't have a cmd defined. In addition to making sure the steps
are executed in the order specified
// TestEntrypointRunningStepsInOrder is an integration test that will // verify attempt to the get the entrypoint of a container image // that doesn ' t have a cmd defined . In addition to making sure the steps // are executed in the order specified
func TestEntrypointRunningStepsInOrder(t *testing.T) {
	ctx := context.Background()
	ctx, cancel := context.WithCancel(ctx)
	defer cancel()
	c, namespace := setup(ctx, t)
	t.Parallel()
	knativetest.CleanupOnInterrupt(func() { tearDown(ctx, t, c, namespace) }, t.Logf)
	defer tearDown(ctx, t, c, namespace)
	t.Logf("Creating TaskRun in namespace %s", namespace)
	if _, err := c.TaskRunClient.Create(ctx, parse.MustParseAlphaTaskRun(t, fmt.Sprintf(`
metadata:
  name: %s
  namespace: %s
spec:
  taskSpec:
    steps:
    - image: busybox
      workingDir: /workspace
      script: 'sleep 3 && touch foo'
    - image: ubuntu
      workingDir: /workspace
      script: 'ls foo'
`, epTaskRunName, namespace)), metav1.CreateOptions{}); err != nil {
		t.Fatalf("Failed to create TaskRun: %s", err)
	}
	t.Logf("Waiting for TaskRun in namespace %s to finish successfully", namespace)
	if err := WaitForTaskRunState(ctx, c, epTaskRunName, TaskRunSucceed(epTaskRunName), "TaskRunSuccess"); err != nil {
		t.Errorf("Error waiting for TaskRun to finish successfully: %s", err)
	}
}
func TestEntrypointRunningStepsInOrder ( t * testing . T ) { ctx := context . Background ( ) ctx , cancel := context . WithCancel ( ctx ) defer cancel ( ) c , namespace := setup ( ctx , t ) t . Parallel ( ) knativetest . CleanupOnInterrupt ( func ( ) { tearDown ( ctx , t , c , namespace ) } , t . Logf ) defer tearDown ( ctx , t , c , namespace ) t . Logf ( " " , namespace ) if _ , err := c . TaskRunClient . Create ( ctx , parse . MustParseAlphaTaskRun ( t , fmt . Sprintf ( `
metadata:
  name: %s
  namespace: %s
spec:
  taskSpec:
    steps:
    - image: busybox
      workingDir: /workspace
      script: 'sleep 3 && touch foo'
    - image: ubuntu
      workingDir: /workspace
      script: 'ls foo'
` , epTaskRunName , namespace ) ) , metav1 . CreateOptions { } ) ; err != nil { t . Fatalf ( " " , err ) } t . Logf ( " " , namespace ) if err := WaitForTaskRunState ( ctx , c , epTaskRunName , TaskRunSucceed ( epTaskRunName ) , " " ) ; err != nil { t . Errorf ( " " , err ) } }
TestEntrypointRunningStepsInOrder is an integration test that will
verify attempt to the get the entrypoint of a container image
that doesn't have a cmd defined.
TestEntrypointRunningStepsInOrder is an integration test that will verify attempt to the get the entrypoint of a container image that doesn ' t have a cmd defined .