Skip to content

Commit

Permalink
Increase test coverage
Browse files Browse the repository at this point in the history
Signed-off-by: David Gageot <david@gageot.net>
  • Loading branch information
dgageot committed Nov 29, 2018
1 parent 2ccf30d commit 3335346
Show file tree
Hide file tree
Showing 5 changed files with 185 additions and 0 deletions.
37 changes: 37 additions & 0 deletions pkg/skaffold/schema/latest/defaults_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
Copyright 2018 The Skaffold Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package latest

import (
"testing"

"github.com/GoogleContainerTools/skaffold/testutil"
)

func TestDetDefaults(t *testing.T) {
pipeline := SkaffoldPipeline{
Build: BuildConfig{
Artifacts: []*Artifact{
{ImageName: "image"},
},
},
}

err := pipeline.SetDefaultValues()

testutil.CheckError(t, false, err)
}
37 changes: 37 additions & 0 deletions pkg/skaffold/schema/v1alpha2/defaults_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
Copyright 2018 The Skaffold Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha2

import (
"testing"

"github.com/GoogleContainerTools/skaffold/testutil"
)

func TestDetDefaults(t *testing.T) {
pipeline := SkaffoldPipeline{
Build: BuildConfig{
Artifacts: []*Artifact{
{ImageName: "image"},
},
},
}

err := pipeline.SetDefaultValues()

testutil.CheckError(t, false, err)
}
37 changes: 37 additions & 0 deletions pkg/skaffold/schema/v1alpha3/defaults_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
Copyright 2018 The Skaffold Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha3

import (
"testing"

"github.com/GoogleContainerTools/skaffold/testutil"
)

func TestDetDefaults(t *testing.T) {
pipeline := SkaffoldPipeline{
Build: BuildConfig{
Artifacts: []*Artifact{
{ImageName: "image"},
},
},
}

err := pipeline.SetDefaultValues()

testutil.CheckError(t, false, err)
}
37 changes: 37 additions & 0 deletions pkg/skaffold/schema/v1alpha4/defaults_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
Copyright 2018 The Skaffold Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha4

import (
"testing"

"github.com/GoogleContainerTools/skaffold/testutil"
)

func TestDetDefaults(t *testing.T) {
pipeline := SkaffoldPipeline{
Build: BuildConfig{
Artifacts: []*Artifact{
{ImageName: "image"},
},
},
}

err := pipeline.SetDefaultValues()

testutil.CheckError(t, false, err)
}
37 changes: 37 additions & 0 deletions pkg/skaffold/schema/v1alpha5/defaults_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
Copyright 2018 The Skaffold Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha5

import (
"testing"

"github.com/GoogleContainerTools/skaffold/testutil"
)

func TestDetDefaults(t *testing.T) {
pipeline := SkaffoldPipeline{
Build: BuildConfig{
Artifacts: []*Artifact{
{ImageName: "image"},
},
},
}

err := pipeline.SetDefaultValues()

testutil.CheckError(t, false, err)
}

0 comments on commit 3335346

Please sign in to comment.