Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions pkg/constants/testlabels/test_labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ const (
// Fuzz describes a fuzz test.
Fuzz = "fuzz"

// Group describes a test related to group logic.
Group = "group"

// Mutation describes a test related to a mutation webhook.
Mutation = "mutation"

Expand All @@ -35,6 +38,9 @@ const (
// Service describes a test related to a service (non-Controller runnable).
Service = "service"

// Snapshot describes a test related to snapshot logic.
Snapshot = "snapshot"

// Update describes a test related to update logic.
Update = "update"

Expand All @@ -59,6 +65,9 @@ const (
// VCSim describes a test that uses vC Sim.
VCSim = "vcsim"

// VKS describes a test related to VKS.
VKS = "vks"

// Webhook describes a test related to a webhook.
Webhook = "webhook"
)
43 changes: 43 additions & 0 deletions pkg/providers/vsphere/vmprovider_cpu_freq_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// © Broadcom. All Rights Reserved.
// The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
// SPDX-License-Identifier: Apache-2.0

package vsphere_test

import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/vmware-tanzu/vm-operator/pkg/providers"
"github.com/vmware-tanzu/vm-operator/pkg/providers/vsphere"
"github.com/vmware-tanzu/vm-operator/test/builder"
)

var _ = Describe("CPU Frequency", func() {
var (
testConfig builder.VCSimTestConfig
ctx *builder.TestContextForVCSim
vmProvider providers.VirtualMachineProviderInterface
)

BeforeEach(func() {
testConfig = builder.VCSimTestConfig{}
})

JustBeforeEach(func() {
ctx = suite.NewTestContextForVCSim(testConfig)
vmProvider = vsphere.NewVSphereVMProviderFromClient(ctx, ctx.Client, ctx.Recorder)
})

AfterEach(func() {
ctx.AfterEach()
ctx = nil
vmProvider = nil
})

Context("ComputeCPUMinFrequency", func() {
It("returns success", func() {
Expect(vmProvider.ComputeCPUMinFrequency(ctx)).To(Succeed())
})
})
})
Loading
Loading