Skip to content

Commit

Permalink
test: fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmad-ibra committed Jul 30, 2024
1 parent 4a29f56 commit baee9b1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion api/v1alpha1/validatorconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type HelmRelease struct {
// Name of the Helm chart.
Name string `json:"name" yaml:"name"`

// Repository containing the Helm chart.
// Repository of the Helm chart.
Repository string `json:"repository" yaml:"repository"`

// Version of the Helm chart.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ spec:
description: Name of the Helm chart.
type: string
repository:
description: Repository containing the Helm chart.
description: Repository of the Helm chart.
type: string
values:
description: Values defines the values to be passed to the Helm
Expand Down
11 changes: 6 additions & 5 deletions internal/controller/testdata/vc-network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ metadata:
name: validator-config-test
namespace: validator
spec:
helmConfig:
registry: https://validator-labs.github.io
authSecretName: validator-plugin-network-chart-secret
plugins:
- chart:
name: validator-plugin-network
repository: https://validator-labs.github.io/validator-plugin-network
authSecretName: validator-plugin-network-chart-secret
version: v0.0.15
- name: validator-plugin-network
repository: validator-plugin-network
version: v0.0.15
values: |-
controllerManager:
kubeRbacProxy:
Expand Down
4 changes: 2 additions & 2 deletions internal/controller/validatorconfig_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ var _ = Describe("ValidatorConfig controller", Ordered, func() {
Plugins: []v1alpha1.HelmRelease{
{
Repository: "bar",
Name: "baz",
Name: "bar",
},
},
},
Expand All @@ -168,7 +168,7 @@ var _ = Describe("ValidatorConfig controller", Ordered, func() {
if err := k8sClient.Get(ctx, vcKey, vc); err != nil {
return false
}
condition, ok := isConditionTrue(vc, "foo", v1alpha1.HelmChartDeployedCondition)
condition, ok := isConditionTrue(vc, "bar", v1alpha1.HelmChartDeployedCondition)
return condition.Status == corev1.ConditionFalse && !ok
}, timeout, interval).Should(BeTrue(), "failed to deploy validator-plugin-network")
})
Expand Down

0 comments on commit baee9b1

Please sign in to comment.