-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (37 loc) · 1.28 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
dry-run:
helm install my ./ --dry-run --debug
install:
helm install my ./
uninstall:
helm uninstall my
test: test_success test_fail
test_success:
@echo "Creating an example pod that waits to be scheduled. After applying scheduler pod should start."
@kubectl apply -f example/example_pod.yaml
@sleep 15
@helm install test-scheduler ./
@sleep 15
@RESULT=`kubectl get pods | grep example-scheduled-pod`; \
if [[ $$RESULT == *"1/1"* ]]; then \
echo "RESULT: Test succeeded! Scheduler works."; \
else \
echo "RESULT: Test failed! Scheduler does not work."; \
fi
@kubectl delete -f example/example_pod.yaml
@helm uninstall test-scheduler
@echo "done\n\n"
test_fail:
@echo "Creating an example pod that waits to be scheduled but cannot because of mistyped scheduler name. After applying scheduler pod should not(!) start."
@kubectl apply -f example/example_pod_fail.yaml
@sleep 15
@helm install test-scheduler ./
@sleep 15
@RESULT=`kubectl get pods | grep example-scheduled-pod`; \
if [[ $$RESULT == *"1/1"* ]]; then \
echo "RESULT: Test failed! Scheduler should not have worked."; \
else \
echo "RESULT: Test succeeded! Scheduler did not apply to the mistyped example pod"; \
fi
@kubectl delete -f example/example_pod_fail.yaml
@helm uninstall test-scheduler
@echo "done\n\n"