Modify PathConfig.PathSlice method and add tests

This commit is contained in:
Jingfang Liu
2018-09-27 14:02:52 -07:00
parent 19197a490e
commit d8b27ef8fe
8 changed files with 106 additions and 6 deletions

View File

@@ -1,3 +1,19 @@
/*
Copyright 2018 The Kubernetes 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 transformerconfig
import (
@@ -125,3 +141,10 @@ func TestMerge(t *testing.T) {
t.Fatalf("expected: %v\n but got: %v\n", expected, actual)
}
}
func TestMakeDefaultTransformerConfig(t *testing.T) {
_, err := MakeDefaultTransformerConfig()
if err != nil {
t.Fatalf("unexpected error %v\n", err)
}
}