Skip to content
Merged
Changes from 2 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
dab613d
This commit stabilizes plugin go/v3-alpha to go/v3 and makes it
estroz Dec 3, 2020
a08bbfb
Fix the path of probes
zoetrope Dec 14, 2020
6e1f8d0
Merge pull request #1905 from zoetrope/fix-probe
k8s-ci-robot Dec 14, 2020
0a807f4
Merge pull request #1882 from estroz/feature/stabilize-go-v3
k8s-ci-robot Dec 14, 2020
7dc4d33
:sparkles: add new extension to markers in order to allow work with .yml
camilamacedo86 Dec 15, 2020
a4ad49a
Merge pull request #1907 from camilamacedo86/add-marker-extension
k8s-ci-robot Dec 15, 2020
90a7ad3
:warning: change structure to store crdVersion and webhkversion (go/v…
camilamacedo86 Dec 11, 2020
762211a
Merge pull request #1899 from camilamacedo86/fix-crd-web-version
k8s-ci-robot Dec 15, 2020
e604838
sparkles: (go/v3-alpha) Add the --force option for the webhook
prafull01 Dec 15, 2020
bba9577
Merge pull request #1903 from prafull01/force-webhook
k8s-ci-robot Dec 15, 2020
258470c
:sparkles: Add the unit tests for HasWebhook
prafull01 Dec 16, 2020
c9114ed
Merge pull request #1909 from prafull01/config-unit-test
k8s-ci-robot Dec 16, 2020
0c02833
:bug: Fix --force option to recreate the files by kubebuilder create api
prafull01 Nov 19, 2020
a4d0a3a
Merge pull request #1847 from prafull01/kb-force
k8s-ci-robot Dec 16, 2020
9ee7a30
Remove spaces from machine-readable comments (v3 only)
Adirio Dec 2, 2020
7245d41
Merge pull request #1868 from Adirio/machine-readable-markers
k8s-ci-robot Dec 17, 2020
6cf73c3
:book: update the docs by removng--plugin=v3/alpha since it no longer…
camilamacedo86 Dec 18, 2020
65f9853
:book: update samples
camilamacedo86 Dec 18, 2020
948887a
Merge pull request #1918 from camilamacedo86/update-docs-testdata-v3
k8s-ci-robot Dec 18, 2020
0082e95
:book: add info to tutorial about apis with examples
camilamacedo86 Dec 18, 2020
ea7e28e
Merge pull request #1920 from camilamacedo86/api-doc-add-info
k8s-ci-robot Dec 21, 2020
8097960
:seedling: Move the license year to 2021 in testdata
prafull01 Jan 5, 2021
23b7082
Merge pull request #1929 from prafull01/copyright-year
k8s-ci-robot Jan 5, 2021
aa9c2e0
Use lowered resource kind as file name
south37 Dec 29, 2020
f660017
Merge pull request #1927 from south37/use-lowered-resource-kind-as-fi…
k8s-ci-robot Jan 6, 2021
26d7b42
Merge pull request #1919 from camilamacedo86/fix-doc-v3-stable
k8s-ci-robot Jan 7, 2021
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
18 changes: 16 additions & 2 deletions pkg/model/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,15 @@ var _ = Describe("ResourceData Version Compatibility", func() {

var _ = Describe("Config", func() {
var (
c *Config
gvk1, gvk2 ResourceData
c *Config
gvk1, gvk2, gvk3 ResourceData
)

BeforeEach(func() {
c = &Config{}
gvk1 = ResourceData{Group: "example", Version: "v1", Kind: "TestKind"}
gvk2 = ResourceData{Group: "example", Version: "v1", Kind: "TestKind2"}
gvk3 = ResourceData{Group: "example", Version: "v1", Kind: "TestKind", Webhooks: &Webhooks{WebhookVersion: v1beta1}}
})

Context("UpdateResource", func() {
Expand Down Expand Up @@ -295,4 +296,17 @@ var _ = Describe("Config", func() {
})

})

Context("HasWebhook", func() {
It("should return true when config has a webhook for the GVK", func() {
c.UpdateResources(gvk3)
Expect(c.Resources).To(Equal([]ResourceData{gvk3}))
Expect(c.HasWebhook(gvk3)).To(BeTrue())
})
It("should return false when config does not have a webhook for the GVK", func() {
c.UpdateResources(gvk1)
Expect(c.Resources).To(Equal([]ResourceData{gvk1}))
Expect(c.HasWebhook(gvk1)).To(BeFalse())
})
})
})