Skip to content

Commit acab5fd

Browse files
committed
[v3] Add the Kptfile struct to render.
There are two approaches to read Kptfile. One is via templating which we can add comments to help users understand the Kptfile. The other is via go struct which is more accurate and less error-prone. Considering the reliability of the Kpt deprecation policies (the api schema is not expected to change and if it is changed it will be backward compatible. If not backward compatible, the deprecation has a year-long period)
1 parent f30fcc0 commit acab5fd

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

pkg/skaffold/render/renderer/renderer_test.go

+2-9
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,10 @@ limitations under the License.
1616
package renderer
1717

1818
import (
19-
"bytes"
20-
"context"
2119
"fmt"
2220
"path/filepath"
2321
"testing"
2422

25-
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph"
2623
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/render/kptfile"
2724
latestV2 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v2"
2825
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/util"
@@ -68,10 +65,6 @@ func TestRender_StoredInCache(t *testing.T) {
6865
Write(filepath.Join(DefaultHydrationDir, kptfile.KptFileName), initKptfile).
6966
Touch("empty.ignored").
7067
Chdir()
68+
}
7169

72-
var b bytes.Buffer
73-
err := r.Render(context.Background(), &b, []graph.Artifact{{ImageName: "leeroy-web", Tag: "leeroy-web:v1"}})
74-
t.CheckNoError(err)
75-
t.CheckFileExistAndContent(filepath.Join(DefaultHydrationDir, dryFileName), []byte(labeledPodYaml))
76-
})
77-
}
70+
}

0 commit comments

Comments
 (0)