Commit Graph

248 Commits

Author SHA1 Message Date
Katrina Verey
55a37de686 Fix other linters on modified lines 2022-08-10 19:34:25 -04:00
Katrina Verey
f6b72077c8 Stop using deprecated ioutil functions 2022-08-10 18:22:46 -04:00
yugo kobayashi
5c9adf248c fix error handling and delete comment to e2econtainerconfig/main.go 2022-07-07 16:10:14 +00:00
yugo kobayashi
fd847108cd refactor cmd/config/internal/commands/e2e 2022-07-06 16:03:47 +00:00
yugo kobayashi
2145d1984f add missing test case 2022-07-05 02:53:32 +00:00
koba1t
a6449aa03f try to fix e2econtainer test 2022-07-05 03:44:56 +09:00
koba1t
9c827f5362 restore ./cmd/config/internal/commands/e2e/e2econtainerconfig 2022-07-02 15:54:48 +09:00
koba1t
175c99f9f6 try to update cmd/config/internal/commands/e2e/e2econtainerconfig code 2022-06-30 05:06:34 +09:00
koba1t
20a93fdd12 update functions/examples/template-go-nginx code and update go1.18 2022-06-30 03:05:00 +09:00
koba1t
8c8a2125b7 update all go.mod to go1.18 2022-06-29 05:14:33 +09:00
Natasha Sarkar
cf89eae804 openapi parsing performance improvement with protobuffer (#4568)
* update necessary dependencies

* update openapi test structure

* remove old swagger files and generate new ones

* use protobuffer to parse openapi for performance improvement
2022-04-18 11:10:43 -07:00
Eng Zer Jun
9452a031ba test: use T.TempDir to create temporary test directory (#4587)
* test: use `T.TempDir` to create temporary test directory

This commit replaces `ioutil.TempDir` with `t.TempDir` in tests. The
directory created by `t.TempDir` is automatically removed when the test
and all its subtests complete.

Prior to this commit, temporary directory created using `ioutil.TempDir`
needs to be removed manually by calling `os.RemoveAll`, which is omitted
in some tests. The error handling boilerplate e.g.
	defer func() {
		if err := os.RemoveAll(dir); err != nil {
			t.Fatal(err)
		}
	}
is also tedious, but `t.TempDir` handles this for us nicely.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

* test: fix `TestInit_noargs` on Windows

--- FAIL: TestInit_noargs (0.01s)
    testing.go:1090: TempDir RemoveAll cleanup: remove C:\Users\RUNNER~1\AppData\Local\Temp\TestInit_noargs3136084632\001: The process cannot access the file because it is being used by another process.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

* test: fix `TestTreeCommandDefaultCurDir_files` on Windows

--- FAIL: TestTreeCommandDefaultCurDir_files (0.01s)
    testing.go:1090: TempDir RemoveAll cleanup: remove C:\Users\RUNNER~1\AppData\Local\Temp\TestTreeCommandDefaultCurDir_files716679291\001: The process cannot access the file because it is being used by another process.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

* test: fix `TestCreateSetterCommand` on Windows

--- FAIL: TestCreateSetterCommand (13.27s)
    --- FAIL: TestCreateSetterCommand/add_replicas (1.45s)
        testing.go:1090: TempDir RemoveAll cleanup: remove C:\Users\RUNNER~1\AppData\Local\Temp\TestCreateSetterCommandadd_replicas176222064\001\k8s-cli-487197005.yaml: The process cannot access the file because it is being used by another process.
    ...
    and all subtests
    ...

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

* test: fix `TestCreateSubstitutionCommand` on Windows

--- FAIL: TestCreateSubstitutionCommand (4.16s)
    --- FAIL: TestCreateSubstitutionCommand/substitution_replicas (1.30s)
        testing.go:1090: TempDir RemoveAll cleanup: remove C:\Users\RUNNER~1\AppData\Local\Temp\TestCreateSubstitutionCommandsubstitution_replicas1352417113\001\k8s-cli-3183612276.yaml: The process cannot access the file because it is being used by another process.
    ...
    and all subtests
    ...

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

* test: fix `TestDeleteSetterCommand` on Windows

--- FAIL: TestDeleteSetterCommand (4.36s)
    --- FAIL: TestDeleteSetterCommand/delete_replicas (1.31s)
        testing.go:1090: TempDir RemoveAll cleanup: remove C:\Users\RUNNER~1\AppData\Local\Temp\TestDeleteSetterCommanddelete_replicas3949811929\001\k8s-cli-957077271.yaml: The process cannot access the file because it is being used by another process.
    ...
    and all subtests
    ...

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

* test: fix `TestDeleteSubstitutionCommand` on Windows

--- FAIL: TestDeleteSubstitutionCommand (2.35s)
    --- FAIL: TestDeleteSubstitutionCommand/delete_only_subst_if_setter_has_same_name_-_long_ref (1.15s)
        testing.go:1090: TempDir RemoveAll cleanup: remove C:\Users\RUNNER~1\AppData\Local\Temp\TestDeleteSubstitutionCommanddelete_only_subst_if_setter_has_same_name_-_long_ref2039728641\001\k8s-cli-1602861478.yaml: The process cannot access the file because it is being used by another process.
    ...
    and all subtests
    ...

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

* test: fix `TestSetCommand` on Windows

--- FAIL: TestSetCommand (13.76s)
    --- FAIL: TestSetCommand/set_replicas (1.13s)
        testing.go:1090: TempDir RemoveAll cleanup: remove C:\Users\RUNNER~1\AppData\Local\Temp\TestSetCommandset_replicas3781384539\001\k8s-cli-1030344459.yaml: The process cannot access the file because it is being used by another process.
    ...
    and all subtests
    ...

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-04-18 09:32:41 -07:00
Katrina Verey
ea193328e3 Run all non plugin module builds 2022-04-04 19:23:08 -04:00
Katrina Verey
46875b6ac4 More makefile cleanup 2022-04-04 16:46:41 -04:00
Katrina Verey
0d32543ebd Makefiles for all modules 2022-04-01 17:31:34 -04:00
Katrina Verey
b0d2e4bdcd Enable more linters for new code 2022-03-31 11:37:26 -04:00
Katrina Verey
71bf0d5d14 Update full linter list and enable some easily resolved new ones 2022-03-31 11:37:26 -04:00
Katrina Verey
0a9c5cb0cf Refactor to fix gocyclo complaint 2022-03-31 11:37:26 -04:00
Katrina Verey
ff4136b1a2 cmd/config linter updates 2022-03-31 11:37:26 -04:00
Natasha Sarkar
e8640724a9 Merge pull request #4497 from m-Bilal/fix-3812
Fix 3812; Error message changed and check for MalformedYamlError
2022-03-24 09:55:44 -07:00
Shoshana Malfatto
7b0ec99d90 retain quotes in namespace transformer filter (#4421)
* check tag values for double quoting

* reuse setentry

* don't override single quotes in merge and fix cm generator immutable val

* get rid of comment

* starlark annotation tests

* don't commit test image changes

* set network to bool

* isSet bool

* updating e2e config tool

* leave createtag

* fn command failing unmarshal test

* fn command test

* don't set style in run-fs

* use setentry to set tag

* remove e2e test changes and make IsStringValue an RNode method
2022-03-23 14:25:19 -07:00
Mohd Bilal
e25db3df2e Test case updated 2022-02-27 09:11:00 +00:00
Mengqi Yu
6850408f6c update test for cmd/config 2021-12-02 14:00:45 -08:00
Mengqi Yu
dfc627068b update tests for cmd/config module 2021-11-19 07:30:31 -08:00
Natasha Sarkar
71b978da1a Merge pull request #4253 from natasha41575/resourceListSDKHelpers
provide utility helpers for preserving internal annotations
2021-10-29 14:25:06 -07:00
natasha41575
b4a69f08c0 provide utility helpers for preserving internal annotations 2021-10-29 12:30:55 -07:00
natasha41575
c3c02887ec bump ResourceList from v1alpha1 to v1 2021-10-19 16:15:27 -07:00
Carlos Ortiz García
548f5ffca9 Update documents from 'configuration' to 'fn' 2021-10-11 12:35:22 -05:00
Jeff Regan
22b735885a Merge pull request #4190 from natasha41575/MigrateIndexPathIdAnnotations
Migrate index path id annotations
2021-09-24 08:00:15 -07:00
Natasha Sarkar
67a5f6d68f support krm spec v1 and legacy path, index, and id annotations 2021-09-17 17:10:10 -07:00
Kubernetes Prow Robot
65e7529ca0 Merge pull request #4097 from natasha41575/deprecateFn
deprecate fn wrap, xargs, sink, source commands
2021-09-16 12:25:27 -07:00
Natasha Sarkar
f70743b267 deprecate some fn commands 2021-09-16 11:48:02 -07:00
Natasha Sarkar
1e1b9b484a exec function working dir is the kustomization that referenced it (#4125)
* exec function working dir is the kustomization that referenced it

* suggested changes

* more code review

* use a field instead of an annotation

* more code review
2021-08-19 20:15:24 -07:00
monopole
d1003d6f8f Automated changes under go 1.16.6 2021-07-24 09:18:58 -07:00
Natasha Sarkar
16dcc98cff deprecate some cfg commands 2021-07-19 14:31:20 -07:00
phani
e1804cbc76 Retain field order after running any arbitrary functions on resources (#4021)
* Reorder resource fields

* Fix comment conflict

* Update e2e test ordering

* Suggested changes
2021-07-07 10:12:44 -07:00
Natasha Sarkar
5c2c617ff0 fix affected cmd/config tests 2021-06-30 10:14:45 -07:00
Khris Richardson
2e674337b3 expose --as-current-user via GetRunFnRunner 2021-06-15 12:30:17 -07:00
Kubernetes Prow Robot
64331ad845 Merge pull request #3964 from ash2k/ash2k/handle-errors2
Handle errors
2021-06-07 16:26:03 -07:00
Mikhail Mazurskiy
a3ed120efb Handle errors 2021-06-05 09:43:13 +10:00
Mattias Öhrn
e468d6b4d2 Fixing cmd/config/internal/commands/e2e/e2e_test.go 2021-06-03 08:29:53 +02:00
Donny Xia
5bb7364967 Fix linter error 2021-05-06 09:54:35 -07:00
Ma Xinjian
677ec868e0 Fix golint warning
golint warning: if block ends with a return statement, so drop this else and outdent its block

Signed-off-by: Ma Xinjian <maxj.fnst@fujitsu.com>
2021-04-30 09:22:57 +08:00
Kubernetes Prow Robot
7716b1bd3d Merge pull request #3821 from phanimarupaka/OverrideIsSameResourceImpl
Support multiple implementations for IsSameResource
2021-04-28 08:42:50 -07:00
Phani Teja Marupaka
8a529ca399 Update merge3 with deafult GVKNN matcher 2021-04-27 23:53:54 -07:00
Gautier Delorme
7e622e1382 remove go-openapi/spec,validate,strfmt from cmd/config/
Signed-off-by: Gautier Delorme <gautier.delorme@gmail.com>
2021-04-25 16:57:39 +02:00
Phani Teja Marupaka
fa96878cfc Don't print Kustomization file in tree output 2021-03-25 17:01:30 -07:00
Phani Teja Marupaka
c3beadacd9 Check if value is provided 2021-03-23 15:40:35 -07:00
Phani Teja Marupaka
26a8455717 Make dir optional for tree command 2021-03-19 16:58:16 -07:00
Natasha Sarkar
e9c97a4c4e updated go version to 1.16 2021-03-02 16:40:08 -08:00