Skip to content

Commit

Permalink
PR fback
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob committed Aug 16, 2021
1 parent 08b7f8a commit 212c44b
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions pkg/apis/provisioning/v1alpha3/provisioner_validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,19 @@ func TestAPIs(t *testing.T) {
}

var _ = Describe("Validation", func() {
var cluster Cluster
var provisioner *Provisioner

BeforeEach(func() {
cluster = Cluster{
Name: ptr.String("test-cluster"),
Endpoint: "https://test-cluster",
CABundle: ptr.String("dGVzdC1jbHVzdGVyCg=="),
}
provisioner = &Provisioner{
ObjectMeta: metav1.ObjectMeta{
Name: strings.ToLower(randomdata.SillyName()),
},
Spec: ProvisionerSpec{
Cluster: cluster,
Cluster: Cluster{
Name: ptr.String("test-cluster"),
Endpoint: "https://test-cluster",
CABundle: ptr.String("dGVzdC1jbHVzdGVyCg=="),
},
},
}
})
Expand Down Expand Up @@ -90,9 +88,7 @@ var _ = Describe("Validation", func() {
"I am a meat popsicle",
"$(echo foo)",
} {
badCluster := cluster
badCluster.Endpoint = endpoint
provisioner.Spec.Cluster = badCluster
provisioner.Spec.Cluster.Endpoint = endpoint
Expect(provisioner.Validate(ctx)).ToNot(Succeed())
}
})
Expand Down

0 comments on commit 212c44b

Please sign in to comment.