Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored create machine tests #345

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KirrTap
Copy link

@KirrTap KirrTap commented Jul 8, 2024

Proposed Changes

  • change integration test folder structure

Fixes #

DeferCleanup(libvirtConn.ConnectClose)
})

func isSocketAvailable(socketPath string) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this function is defined multiple times. Probably whole server_suite_test.go were copied. It has to be refactor.

@@ -107,6 +107,10 @@ test: manifests generate fmt vet envtest ## Run tests. Some test depend on Linux
integration-tests: ## Run integration tests against code. For dependencies, refer to the integration-test workflow.
go run github.com/onsi/ginkgo/v2/ginkgo run -r --label-filter="integration" -coverprofile cover.out

# .PHONY: integration-tests
Copy link
Contributor

@lukas016 lukas016 Sep 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is duplicity. it can be deleted.

@@ -101,7 +101,7 @@ var _ = Describe("ListEvents", func() {

By("listing the machine events with matching label filter and non matching time filter")
resp, err = machineClient.ListEvents(ctx, &iri.ListEventsRequest{Filter: &iri.EventFilter{
LabelSelector: map[string]string{machinepoolletv1alpha1.MachineUIDLabel: "foobar"},
LabelSelector: map[string]string{machinepoolletv1alpha1.MachineUIDLabel: "eventlist"},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this correct?

pluginOpts := networkinterfaceplugin.NewDefaultOptions()
pluginOpts.PluginName = "isolated"

// tempDir = "/home/pcmil/libvirt-provider/temptest"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code from testing

@lukas016 lukas016 marked this pull request as draft September 26, 2024 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests to run integration tests size/XXL
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

3 participants