Start api directory, which will become a module.

This commit is contained in:
Jeffrey Regan
2019-10-17 11:36:34 -07:00
parent 180429774a
commit e5c8b5ec8f
226 changed files with 623 additions and 689 deletions

View File

@@ -1,18 +1,5 @@
/*
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.
*/
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package config
@@ -22,7 +9,7 @@ import (
"strings"
"testing"
"sigs.k8s.io/kustomize/v3/pkg/gvk"
"sigs.k8s.io/kustomize/v3/api/resid"
)
func TestPathSlice(t *testing.T) {
@@ -61,19 +48,19 @@ var mergeTests = []struct {
fsSlice{
{
Path: "whatever",
Gvk: gvk.Gvk{Group: "apple"},
Gvk: resid.Gvk{Group: "apple"},
CreateIfNotPresent: false,
},
{
Path: "whatever",
Gvk: gvk.Gvk{Group: "pear"},
Gvk: resid.Gvk{Group: "pear"},
CreateIfNotPresent: false,
},
},
fsSlice{
{
Path: "home",
Gvk: gvk.Gvk{Group: "beans"},
Gvk: resid.Gvk{Group: "beans"},
CreateIfNotPresent: false,
},
},
@@ -81,17 +68,17 @@ var mergeTests = []struct {
fsSlice{
{
Path: "whatever",
Gvk: gvk.Gvk{Group: "apple"},
Gvk: resid.Gvk{Group: "apple"},
CreateIfNotPresent: false,
},
{
Path: "whatever",
Gvk: gvk.Gvk{Group: "pear"},
Gvk: resid.Gvk{Group: "pear"},
CreateIfNotPresent: false,
},
{
Path: "home",
Gvk: gvk.Gvk{Group: "beans"},
Gvk: resid.Gvk{Group: "beans"},
CreateIfNotPresent: false,
},
},
@@ -101,19 +88,19 @@ var mergeTests = []struct {
fsSlice{
{
Path: "whatever",
Gvk: gvk.Gvk{Group: "apple"},
Gvk: resid.Gvk{Group: "apple"},
CreateIfNotPresent: false,
},
{
Path: "whatever",
Gvk: gvk.Gvk{Group: "pear"},
Gvk: resid.Gvk{Group: "pear"},
CreateIfNotPresent: false,
},
},
fsSlice{
{
Path: "whatever",
Gvk: gvk.Gvk{Group: "apple"},
Gvk: resid.Gvk{Group: "apple"},
CreateIfNotPresent: false,
},
},
@@ -121,12 +108,12 @@ var mergeTests = []struct {
fsSlice{
{
Path: "whatever",
Gvk: gvk.Gvk{Group: "apple"},
Gvk: resid.Gvk{Group: "apple"},
CreateIfNotPresent: false,
},
{
Path: "whatever",
Gvk: gvk.Gvk{Group: "pear"},
Gvk: resid.Gvk{Group: "pear"},
CreateIfNotPresent: false,
},
},
@@ -136,19 +123,19 @@ var mergeTests = []struct {
fsSlice{
{
Path: "whatever",
Gvk: gvk.Gvk{Group: "apple"},
Gvk: resid.Gvk{Group: "apple"},
CreateIfNotPresent: false,
},
{
Path: "whatever",
Gvk: gvk.Gvk{Group: "pear"},
Gvk: resid.Gvk{Group: "pear"},
CreateIfNotPresent: false,
},
},
fsSlice{
{
Path: "whatever",
Gvk: gvk.Gvk{Group: "apple"},
Gvk: resid.Gvk{Group: "apple"},
CreateIfNotPresent: true,
},
},