File tree Expand file tree Collapse file tree 1 file changed +23
-8
lines changed
internal/controller/mapserver Expand file tree Collapse file tree 1 file changed +23
-8
lines changed Original file line number Diff line number Diff line change @@ -16,17 +16,32 @@ const (
1616)
1717
1818func TestGetVolumeMountsForDeployment (t * testing.T ) {
19- var v2wfs v2beta1.WFS
20- err := yaml .Unmarshal ([]byte (v2WfsString ), & v2wfs )
21- assert .NoError (t , err )
22- var wfs pdoknlv3.WFS
23- v2beta1 .V3WFSHubFromV2 (& v2wfs , & wfs )
24-
19+ var wfs = getV3 ()
2520 pdoknlv3 .SetHost ("https://service.pdok.nl" )
26- result := GetVolumeMountsForDeployment (& wfs , "/srv" )
21+ result := GetVolumeMountsForDeployment (wfs , "/srv" )
2722
2823 var expectedVolumeMounts []v1.VolumeMount
29- err = json .Unmarshal ([]byte (expectedVolumeMountsString ), & expectedVolumeMounts )
24+ err : = json .Unmarshal ([]byte (expectedVolumeMountsString ), & expectedVolumeMounts )
3025 assert .NoError (t , err )
3126 assert .Equal (t , expectedVolumeMounts , result )
3227}
28+
29+ func TestGetEnvVarsForDeployment (t * testing.T ) {
30+ var wfs = getV3 ()
31+ pdoknlv3 .SetHost ("https://service.pdok.nl" )
32+ result := GetEnvVarsForDeployment (wfs , "blobs-secret" )
33+ a := 0
34+ _ = result
35+ _ = a
36+ }
37+
38+ func getV3 () * pdoknlv3.WFS {
39+ var v2wfs v2beta1.WFS
40+ err := yaml .Unmarshal ([]byte (v2WfsString ), & v2wfs )
41+ if err != nil {
42+ panic (err )
43+ }
44+ var wfs pdoknlv3.WFS
45+ v2beta1 .V3WFSHubFromV2 (& v2wfs , & wfs )
46+ return & wfs
47+ }
You can’t perform that action at this time.
0 commit comments