Skip to content

Commit

Permalink
Add: add tests for valkey for jobs
Browse files Browse the repository at this point in the history
Co-authored-by: Kyrre Havik <[email protected]>
Co-authored-by: Morten Lied Johansen <[email protected]>
  • Loading branch information
3 people committed Jan 20, 2025
1 parent 8465235 commit 7ace3fc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
7 changes: 7 additions & 0 deletions pkg/apis/nais.io/v1/naisjob_doc_example.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,13 @@ func ExampleNaisjobForDocumentation() *Naisjob {
},
},
},
Valkey: []Valkey{
{
Instance: "cache",
Access: "readwrite",
},
},

Vault: &Vault{
Enabled: true,
Paths: []SecretPath{
Expand Down
3 changes: 2 additions & 1 deletion pkg/apis/nais.io/v1/naisjob_doc_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ var ignoredApplicationFields = []string{
`.Spec.Azure.Application.ReplyURLs`,
`.Spec.Azure.Application.SinglePageApplication`,
`.Spec.Azure.Application.Tenant`,
`.Spec.Redis`, // TODO: Add to example when feature is ready
`.Spec.Redis`, // TODO: Add to example when feature is ready
`.Spec.Valkey`, // TODO: Add to example when feature is ready
}

// Test that the example NaisJob contains examples for all fields encountered.
Expand Down
13 changes: 7 additions & 6 deletions pkg/apis/nais.io/v1alpha1/application_doc_example.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,12 +425,6 @@ func ExampleApplicationForDocumentation() *Application {
Access: "readwrite",
},
},
Valkey: []nais_io_v1.Valkey{
{
Instance: "cache",
Access: "readwrite",
},
},
Replicas: &nais_io_v1.Replicas{
Min: intutil.Intp(2),
Max: intutil.Intp(4),
Expand Down Expand Up @@ -509,6 +503,13 @@ func ExampleApplicationForDocumentation() *Application {
},
},
},
Valkey: []nais_io_v1.Valkey{
{
Instance: "cache",
Access: "readwrite",
},
},

Vault: &nais_io_v1.Vault{
Enabled: true,
Paths: []nais_io_v1.SecretPath{
Expand Down

0 comments on commit 7ace3fc

Please sign in to comment.