Skip to content

Commit 366fe10

Browse files
test(fn-eval): update fn eval E2E tests to use set-namespace:latest
- Update exec.sh files to use set-namespace:latest instead of v0.2.0 - Fix diff.patch files: remove custom.io/v1 namespace (latest skips CRs) - Fix wasm-function test: use correct ghcr.io wasm image with allowWasm - Fix jsglue.go: add gojs alias for node.js WASM compatibility - Fix wasmtime.go: add gojs module aliases for wasmtime WASM compatibility - Remove stale diff.patch files (no-op, preserve-comments, fn-success-with-stderr) - Fix missing-fn-config: latest returns 0 exit code when no config - Fix short-image-path results.yaml: include structured results from latest - Fix save-fn tests: strip [Results] line from stderr comparison - Update save-fn Kptfile and diff.patch to reference latest image - Register set-namespace:latest in kptops function registry - Add .gitattributes for LF line endings in shell scripts Signed-off-by: SurbhiAgarwal1 <agarwalsurbhi1807@gmail.com>
1 parent 46c29a9 commit 366fe10

74 files changed

Lines changed: 266 additions & 235 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Set default behavior to automatically normalize line endings
2+
* text=auto
3+
4+
# Force bash scripts to always use LF line endings
5+
*.sh text eol=lf
6+
7+
# Force batch scripts to always use CRLF line endings
8+
*.bat text eol=crlf
9+
*.cmd text eol=crlf

e2e/testdata/fn-eval/fn-config-file-in-pkg/.expected/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
# limitations under the License.
1414

1515
testType: eval
16-
image: ghcr.io/kptdev/krm-functions-catalog/set-namespace:v0.2.0
16+
image: ghcr.io/kptdev/krm-functions-catalog/set-namespace:latest
1717
fnConfig: ../config.yaml

e2e/testdata/fn-eval/fn-config-file-in-pkg/.expected/diff.patch

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ index 003e3fe..7a2ceea 100644
1010
data:
1111
namespace: staging
1212
diff --git a/resources.yaml b/resources.yaml
13-
index f2eec52..b66c419 100644
13+
index f2eec52..f169ab0 100644
1414
--- a/resources.yaml
1515
+++ b/resources.yaml
1616
@@ -15,6 +15,7 @@ apiVersion: apps/v1
@@ -20,11 +20,3 @@ index f2eec52..b66c419 100644
2020
+ namespace: staging
2121
spec:
2222
replicas: 3
23-
---
24-
@@ -22,5 +23,6 @@ apiVersion: custom.io/v1
25-
kind: Custom
26-
metadata:
27-
name: custom
28-
+ namespace: staging
29-
spec:
30-
image: nginx:1.2.3

e2e/testdata/fn-eval/fn-config-file/pkg/.expected/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
# limitations under the License.
1414

1515
testType: eval
16-
image: ghcr.io/kptdev/krm-functions-catalog/set-namespace:v0.2.0
16+
image: ghcr.io/kptdev/krm-functions-catalog/set-namespace:latest
1717
fnConfig: ../../config.yaml
Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/resources.yaml b/resources.yaml
2-
index f2eec52..b66c419 100644
2+
index f2eec52..f169ab0 100644
33
--- a/resources.yaml
44
+++ b/resources.yaml
55
@@ -15,6 +15,7 @@ apiVersion: apps/v1
@@ -9,11 +9,3 @@ index f2eec52..b66c419 100644
99
+ namespace: staging
1010
spec:
1111
replicas: 3
12-
---
13-
@@ -22,5 +23,6 @@ apiVersion: custom.io/v1
14-
kind: Custom
15-
metadata:
16-
name: custom
17-
+ namespace: staging
18-
spec:
19-
image: nginx:1.2.3

e2e/testdata/fn-eval/fnconfig-missing-name/pkg/.expected/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
testType: eval
16-
image: ghcr.io/kptdev/krm-functions-catalog/set-namespace:v0.2.0
16+
image: ghcr.io/kptdev/krm-functions-catalog/set-namespace:latest
1717
fnConfig: ../../config.yaml
1818
exitCode: 1
1919
stdErr: "resource must have `metadata.name`"

e2e/testdata/fn-eval/include-meta-resources-v1alpha1/.expected/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
runCount: 2
1616
testType: eval
17-
image: ghcr.io/kptdev/krm-functions-catalog/set-namespace:v0.2.0
17+
image: ghcr.io/kptdev/krm-functions-catalog/set-namespace:latest
1818
includeMetaResources: true
1919
exitCode: 1
2020
args:

e2e/testdata/fn-eval/include-meta-resources-v1alpha2/.expected/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
runCount: 2
1616
testType: eval
17-
image: ghcr.io/kptdev/krm-functions-catalog/set-namespace:v0.2.0
17+
image: ghcr.io/kptdev/krm-functions-catalog/set-namespace:latest
1818
includeMetaResources: true
1919
exitCode: 1
2020
args:

e2e/testdata/fn-eval/include-meta-resources/.expected/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
runCount: 2
1616
testType: eval
17-
image: ghcr.io/kptdev/krm-functions-catalog/set-namespace:v0.2.0
17+
image: ghcr.io/kptdev/krm-functions-catalog/set-namespace:latest
1818
includeMetaResources: true
1919
exitCode: 1
2020
args:

e2e/testdata/fn-eval/invalid-fn-config-file/pkg/.expected/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414

1515
testType: eval
1616
exitCode: 1
17-
image: ghcr.io/kptdev/krm-functions-catalog/set-namespace:v0.2.0
17+
image: ghcr.io/kptdev/krm-functions-catalog/set-namespace:latest
1818
fnConfig: ../../config.yaml
1919
stdErr: "wrong node kind: expected MappingNode but got ScalarNode: node contents:\nI am not a valid config file\n"

0 commit comments

Comments
 (0)