Skip to content

Commit

Permalink
move variable
Browse files Browse the repository at this point in the history
  • Loading branch information
musa-asad committed Dec 20, 2024
1 parent 545a256 commit 67c6371
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion util/common/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,15 @@ func ApplyResources(env *environment.MetaData) error {
return fmt.Errorf("failed to wait for operator deployment: %w\nOutput: %s", err, output)
}

deploymentName := strings.TrimSuffix(filepath.Base(env.SampleApp), ".yaml")

apply := exec.Command("kubectl", "apply", "-f", env.SampleApp)
output, err = apply.CombinedOutput()
if err != nil {
return fmt.Errorf("failed to apply sample app: %w\nOutput: %s", err, output)
}

fmt.Println("Waiting for Sample Application to initialize...")
deploymentName := strings.TrimSuffix(filepath.Base(env.SampleApp), ".yaml")
wait = exec.Command("kubectl", "wait", "--for=condition=available", "--timeout=300s", fmt.Sprintf("deployment/%s", deploymentName), "-n", "test")
output, err = wait.CombinedOutput()
if err != nil {
Expand Down

0 comments on commit 67c6371

Please sign in to comment.