Skip to content

Commit 50d60d1

Browse files
committed
Adding integration test
Signed-off-by: Rahul Sinha <[email protected]>
1 parent 20dd146 commit 50d60d1

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
FROM node:8.12.0-alpine
22

3+
ARG SCRIPT
4+
ENV SCRIPT ${SCRIPT}
35
WORKDIR /opt/backend
46
EXPOSE 3000
5-
CMD ["npm", "run", "dev"]
7+
CMD ["npm", "run", ${SCRIPT}]
68

79
COPY . .
810
RUN npm install

integration/examples/nodejs/skaffold.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ build:
44
artifacts:
55
- image: gcr.io/k8s-skaffold/node-example
66
context: backend
7+
docker:
8+
buildArgs:
9+
SCRIPT: "{{.SCRIPT_ENV}}"
710
sync:
811
'*.js': .
912
deploy:

integration/run_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ func TestRun(t *testing.T) {
4545
}, {
4646
description: "nodejs",
4747
dir: "examples/nodejs",
48+
env: []string{"SCRIPT_ENV=dev"},
4849
pods: []string{"node"},
4950
}, {
5051
description: "structure-tests",

0 commit comments

Comments
 (0)