summaryrefslogtreecommitdiffstats
path: root/cds-regression-test/test/resource-resolution/init-mockserver.sh
blob: 005ed2f2cede38c2fca372fc1bcc1b7cea5ec16d (plain)
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
45
46
47
48
49
50
51
#!/bin/bash

curl -v -X PUT "http://$MOCKSERVER_URL:$MOCKSERVER_PORT/mockserver/expectation" -d '{
  "httpRequest" : {
    "method" : "GET",
    "path" : "/get"
  },
  "httpResponse" : {
    "body" : "{\"value\": \"get:ok\"}"
  }
}'

curl -v -X PUT "http://$MOCKSERVER_URL:$MOCKSERVER_PORT/mockserver/expectation" -d '{
  "httpRequest" : {
    "method" : "POST",
    "path" : "/post"
  },
  "httpResponse" : {
    "body" : "{\"value\": \"post:ok\"}"
  }
}'

curl -v -X PUT "http://$MOCKSERVER_URL:$MOCKSERVER_PORT/mockserver/expectation" -d '{
  "httpRequest" : {
    "method" : "PUT",
    "path" : "/put"
  },
  "httpResponse" : {
    "body" : "{\"value\": \"put:ok\"}"
  }
}'

curl -v -X PUT "http://$MOCKSERVER_URL:$MOCKSERVER_PORT/mockserver/expectation" -d '{
  "httpRequest" : {
    "method" : "PATCH",
    "path" : "/patch"
  },
  "httpResponse" : {
    "body" : "{\"value\": \"patch:ok\"}"
  }
}'

curl -v -X PUT "http://$MOCKSERVER_URL:$MOCKSERVER_PORT/mockserver/expectation" -d '{
  "httpRequest" : {
    "method" : "DELETE",
    "path" : "/delete"
  },
  "httpResponse" : {
    "body" : "{\"value\": \"delete:ok\"}"
  }
}'