Skip to content

Commit e38d857

Browse files
authored
chore: use the base64 template func (#12)
Co-authored-by: rick <LinuxSuRen@users.noreply.github.com>
1 parent c6ec2d7 commit e38d857

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ init-env:
1212
curl https://linuxsuren.github.io/tools/install.sh|bash
1313
hd i cli/cli
1414
hd i atest
15+
gh repo fork --remote
16+
gh repo set-default devops-ws/learn-springboot

e2e/start.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ do
1515
if [ $? -eq 1 ]
1616
then
1717
code=-1
18-
docker-compose -f "$file" logs | grep e2e-server
19-
docker-compose -f "$file" logs | grep e2e-testing
18+
docker-compose -f "$file" logs | grep server
19+
docker-compose -f "$file" logs | grep testing
2020
docker-compose ps -a | grep e2e-testing | grep "Exited (0)"
2121
if [ $? -eq 0 ]
2222
then

e2e/test-suite.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
name: SpringBoot
44
api: |
55
{{default "http://localhost:8080" (env "SERVER")}}
6+
param:
7+
auth: Basic {{ base64 "admin:123456" }}
68
items:
79
- name: health
810
request:
@@ -11,14 +13,14 @@ items:
1113
request:
1214
api: /lower
1315
header:
14-
Authorization: Basic YWRtaW46MTIzNDU2
16+
Authorization: "{{ .param.auth }}"
1517
expect:
1618
statusCode: 400
1719
- name: toLower
1820
request:
1921
api: /lower?text=Hello
2022
header:
21-
Authorization: Basic YWRtaW46MTIzNDU2
23+
Authorization: "{{ .param.auth }}"
2224
expect:
2325
body: hello
2426

@@ -27,7 +29,7 @@ items:
2729
request:
2830
api: /cookies/echo
2931
header:
30-
Authorization: Basic YWRtaW46MTIzNDU2
32+
Authorization: "{{ .param.auth }}"
3133
expect:
3234
body: cookies are empty
3335

0 commit comments

Comments
 (0)