Skip to content

Commit

Permalink
Change CI tag to latest version and VM id.
Browse files Browse the repository at this point in the history
Signed-off-by: Bella Khizgiyaev <[email protected]>
  • Loading branch information
bkhizgiy committed Nov 29, 2023
1 parent d5e8695 commit ec3e531
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: kubev2v/forkliftci
ref: v9.0
ref: v10.0

- name: Build and setup everything with bazel
id: forkliftci
Expand Down
2 changes: 1 addition & 1 deletion tests/suit/framework/ova.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func (r *OvaClient) LoadSourceDetails() (vm *OvaVM, err error) {
r.storageClass = "nfs-csi"
}

r.vmData.testVMId = "21bf790bcdc4591ef01ec6fa7b4812e0d830"
r.vmData.testVMId = "c5686650854d1e69b4123f4bf2e70fe1ed2a"
r.vmData.testNetworkID = "ae1badc8c693926f492a01e2f357d6af321b"
r.vmData.testStorageName = "Dummy storage for source provider ova-provider"
return &r.vmData, nil
Expand Down
38 changes: 38 additions & 0 deletions tests/suit/ova_test.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
package suit_test

import (
"bytes"
"context"
"fmt"
"io"
"strings"
"time"

forkliftv1 "github.com/konveyor/forklift-controller/pkg/apis/forklift/v1beta1"
"github.com/konveyor/forklift-controller/tests/suit/framework"
"github.com/konveyor/forklift-controller/tests/suit/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
core "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

const (
Expand Down Expand Up @@ -78,6 +85,37 @@ var _ = Describe("[level:component]Migration tests for OVA provider", func() {
err = utils.CreateMigrationFromDefinition(f.CrClient, migrationDef)
Expect(err).ToNot(HaveOccurred())
err = utils.WaitForMigrationSucceededWithTimeout(f.CrClient, provider.Namespace, test_migration_name, 900*time.Second)

Check failure on line 87 in tests/suit/ova_test.go

View workflow job for this annotation

GitHub Actions / lint

ineffectual assignment to err (ineffassign)
//if err != nil {
podname := ""
pods, err := f.K8sClient.CoreV1().Pods(targetNS.Name).List(context.Background(), metav1.ListOptions{})
if err != nil {
fmt.Println("this is error, ", err)
}

for _, pod := range pods.Items {
if strings.Contains(pod.Name, "virtv2v") {
podname = pod.Name
}
}
podLogOpts := core.PodLogOptions{}
request := f.K8sClient.CoreV1().Pods(namespace).GetLogs(podname, &podLogOpts)
podLogs, err := request.Stream(context.Background())
if err != nil {
panic(err.Error())
}
defer podLogs.Close()

buf := new(bytes.Buffer)
_, err = io.Copy(buf, podLogs)
if err != nil {
panic(err.Error())
}
str := buf.String()

fmt.Println("Logs for pod", podname)
fmt.Println(str)

//}
Expect(err).ToNot(HaveOccurred())

})
Expand Down

0 comments on commit ec3e531

Please sign in to comment.