Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 00bf666

Browse files
ti-srebot3pointer
andauthored
test: remove python code (#699) (#700)
* cherry pick #699 to release-4.0 Signed-off-by: ti-srebot <ti-srebot@pingcap.com> * fix conflict Co-authored-by: 3pointer <luancheng@pingcap.com>
1 parent e8a906b commit 00bf666

File tree

4 files changed

+28
-11
lines changed

4 files changed

+28
-11
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ build_for_integration_test:
3838
-o bin/br.test && \
3939
$(GOBUILD) $(RACEFLAG) -o bin/locker tests/br_key_locked/*.go && \
4040
$(GOBUILD) $(RACEFLAG) -o bin/gc tests/br_z_gc_safepoint/*.go && \
41+
$(GOBUILD) $(RACEFLAG) -o bin/oauth tests/br_gcs/*.go && \
4142
$(GOBUILD) $(RACEFLAG) -o bin/rawkv tests/br_rawkv/*.go) || (make failpoint-disable && exit 1)
4243
@make failpoint-disable
4344

tests/br_gcs/oauth.go

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Copyright 2020 PingCAP, Inc.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
14+
package main
15+
16+
import (
17+
"net/http"
18+
)
19+
20+
func main() {
21+
http.HandleFunc("/oauth/token", func(w http.ResponseWriter, r *http.Request) {
22+
_, _ = w.Write([]byte(`{"access_token": "ok", "token_type":"service_account", "expires_in":3600}`))
23+
})
24+
_ = http.ListenAndServe(":5000", nil)
25+
}

tests/br_gcs/oauth.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

tests/br_gcs/run.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ while ! curl -o /dev/null -v -s "http://$GCS_HOST:$GCS_PORT/"; do
3636
done
3737

3838
# start oauth server
39-
killall flask || true
40-
FLASK_APP=tests/$TEST_NAME/oauth.py flask run &
39+
bin/oauth &
40+
OAUTH_ID=$!
4141

4242
stop_gcs() {
4343
kill -2 $GCS_ID

0 commit comments

Comments
 (0)