File tree Expand file tree Collapse file tree 4 files changed +53
-0
lines changed Expand file tree Collapse file tree 4 files changed +53
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ x-go-variables: &go-variables
13
13
GOMODCACHE : /gomodcache
14
14
GO_DISCOVERY_CONFIG_DYNAMIC :
15
15
GO_DISCOVERY_LOG_LEVEL : ${GO_DISCOVERY_LOG_LEVEL:-info}
16
+ GO_DISCOVERY_SERVE_STATS : " true"
16
17
17
18
services :
18
19
allbash :
@@ -41,6 +42,18 @@ services:
41
42
volumes :
42
43
- ../../:/pkgsite
43
44
working_dir : /pkgsite
45
+ api :
46
+ image : golang:1.15.5
47
+ depends_on :
48
+ - frontend
49
+ environment :
50
+ << : *go-variables
51
+ WAITFORIT_TIMEOUT : 300
52
+ entrypoint : ./third_party/wait-for-it/wait-for-it.sh frontend:8080 -- go run
53
+ command : " tests/api/main.go -frontend http://host.docker.internal:8080 -all compare "
54
+ volumes :
55
+ - ../../:/pkgsite
56
+ working_dir : /pkgsite
44
57
e2e :
45
58
image : node:14.17.0
46
59
depends_on :
Original file line number Diff line number Diff line change
1
+ experiments :
2
+ - Name : symbol-history-main-page
3
+ Rollout : 100
4
+ - Name : symbol-history-versions-page
5
+ Rollout : 100
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # Copyright 2021 The Go Authors. All rights reserved.
4
+ # Use of this source code is governed by a BSD-style
5
+ # license that can be found in the LICENSE file.
6
+
7
+ source devtools/docker.sh || { echo " Are you at repo root?" ; exit 1; }
8
+
9
+ set -e
10
+
11
+ main () {
12
+ trap docker_cleanup EXIT
13
+ trap docker_error ERR
14
+
15
+ export GO_DISCOVERY_DATABASE_NAME=discovery_api_test
16
+ export GO_DISCOVERY_CONFIG_DYNAMIC=tests/api/config.yaml
17
+ export GO_DISCOVERY_SEED_DB_FILE=tests/api/seed.txt
18
+ dockercompose build && dockercompose run seeddb && dockercompose run api
19
+
20
+ local status=$?
21
+ if [ $status -eq 0 ]
22
+ then
23
+ echo " Done!"
24
+ else
25
+ echo " API tests failed."
26
+ fi
27
+ exit $status
28
+ }
29
+
30
+ main $@
Original file line number Diff line number Diff line change
1
+ # Copyright 2021 The Go Authors. All rights reserved.
2
+ # Use of this source code is governed by a BSD-style
3
+ # license that can be found in the LICENSE file.
4
+
5
+ rsc.io/quote@all
You can’t perform that action at this time.
0 commit comments